fixed problem with dates