fix for date comparisons