Fix a couple issues with the permissions manager