datesort fixes