Sort the team scores in the backend