Fix revoke all permissions bug