Date filtering bug solved