Fix bug with team_ids being overwritten by team names.