Fix the sorting