bug fix on date