Fix getPermissions