Fix problem with parsing date