Fix sorting order when sorting by time and size