correct date handling