Fix sorting problem.