Fixed a bit bug in dates