Fix issue with lowestTeam function