This should fix issue #1508
Merge pull request #1510 from xisi/security-pagecontrollerfix

Fix issue #1508