Fix sorting of items