diff --git a/src/EventSubscriber/ProtectedPagesSubscriber.php b/src/EventSubscriber/ProtectedPagesSubscriber.php
index ef20a19..da5e529 100644
--- a/src/EventSubscriber/ProtectedPagesSubscriber.php
+++ b/src/EventSubscriber/ProtectedPagesSubscriber.php
@@ -117,7 +116,8 @@
     if ($this->currentUser->hasPermission('bypass pages password protection')) {
       return;
     }
-    $current_path = $this->aliasManager->getAliasByPath($this->currentPath->getPath());
+    $request = $this->requestStack->getCurrentRequest();
+    $current_path = $this->aliasManager->getAliasByPath($this->currentPath->getPath($request));
     $normal_path = mb_strtolower($this->aliasManager->getPathByAlias($current_path));
     $pid = $this->protectedPagesIsPageLocked($current_path, $normal_path);
     $this->sendAccessDenied($pid);
