fixed a date bug