Fixed Variable Scopes in Permissions Controller.