date bug fix