Fix sorting order