Fixed $team causing crashes