Fix issue with comparing dates to strings