diff --git a/lib/_autoload_modules.php b/lib/_autoload_modules.php
index 9a6d5f6c69828f29f8bec500224536050302cb0e..773e5e1f306ba2822073f860a12328bfb3913966 100644
--- a/lib/_autoload_modules.php
+++ b/lib/_autoload_modules.php
@@ -54,7 +54,7 @@ function SimpleSAML_autoload_psr4($className)
     if (array_shift($elements) !== 'SimpleSAML') {
         return; // the first element is not "SimpleSAML"
     }
-    if (array_shift($elements) !== 'module') {
+    if (array_shift($elements) !== 'Module') {
         return; // the second element is not "module"
     }