fix group membership bugs