fix problem with dates