date format bug fix