Fixed error in joining a team