Fix fix_permissions for users with a different schema