Fixed issue with date filtering