Fix sorting of due dates