fixing bugs in team controller