Fix problem with dates