Fixing a date bug