Modify the list.sortByTotalScore to avoid possible exception