fixed comparing dates