fixing sort order for dates, was reversed