Fix a logic error for team joins.