fixed pagination when category and grade filters are applied