Added correct date handling