Fix bug in setting player team.