Sorting is properly implemented now.