Fix typo in date handling