Fix problem when sorting teams by division