bug fix for filtering by date range