Fixed an issue with dates