Fixing sorting.