Fix sorting of jobs.