Fixed the date handling.