Fixed misplaced sort.