Fixed a bug with filters and pagination