Fix lookupUserRights query