date filtering bug fixes