fixed crash when team is empty