Fixed so it works for ranked and unranked teams.