Fix bug with error when parse date from string