Fix the sort process.