diff --git a/modules/saml/lib/Controller/Metadata.php b/modules/saml/lib/Controller/Metadata.php
index 15bb343e7443234fbf72441591376c2f2cd34838..b4ff1428f61e3f1916ea9c76a3291fd093b97920 100644
--- a/modules/saml/lib/Controller/Metadata.php
+++ b/modules/saml/lib/Controller/Metadata.php
@@ -13,6 +13,7 @@ use SimpleSAML\Module;
 use SimpleSAML\Module\saml\IdP\SAML2 as SAML2_IdP;
 use SimpleSAML\Utils;
 use Symfony\Component\HttpFoundation\Request;
+use Symfony\Component\HttpFoundation\Response;
 
 use function strpos;
 use function strrpos;
@@ -73,7 +74,7 @@ class Metadata
         }
 
         // check if valid local session exists
-        if ($config->getOptionalBoolean('admin.protectmetadata', false)) {
+        if ($this->config->getOptionalBoolean('admin.protectmetadata', false)) {
             return new RunnableResponse([$this->authUtils, 'requireAdmin']);
         }
 
diff --git a/modules/saml/lib/Controller/SingleLogout.php b/modules/saml/lib/Controller/SingleLogout.php
index f5f9e344acdf1741c0fdeae168c9bf969553b33f..90195a322ebfdd1a8ebf18fbf9b3c4f2593e330b 100644
--- a/modules/saml/lib/Controller/SingleLogout.php
+++ b/modules/saml/lib/Controller/SingleLogout.php
@@ -89,7 +89,7 @@ class SingleLogout
     {
         Logger::info('SAML2.0 - IdP.initSLO: Accessing SAML 2.0 IdP endpoint init Single Logout');
 
-        if ($this->config->getOptionalBoolean('enable.saml20-idp') === false || !Module::isModuleEnabled('saml')) {
+        if ($this->config->getBoolean('enable.saml20-idp') === false || !Module::isModuleEnabled('saml')) {
             throw new Error\Error('NOACCESS', null, 403);
         }
 
diff --git a/modules/saml/lib/Controller/WebBrowserSingleSignOn.php b/modules/saml/lib/Controller/WebBrowserSingleSignOn.php
index 5cac59c8a9b24347a6d32ca44878a49bfc08f290..7a996cd4ecbd0f97220b368841be5b9082f116f4 100644
--- a/modules/saml/lib/Controller/WebBrowserSingleSignOn.php
+++ b/modules/saml/lib/Controller/WebBrowserSingleSignOn.php
@@ -4,6 +4,7 @@ declare(strict_types=1);
 
 namespace SimpleSAML\Module\saml\Controller;
 
+use Exception;
 use SAML2\Exception\Protocol\UnsupportedBindingException;
 use SAML2\ArtifactResolve;
 use SAML2\ArtifactResponse;