Fixed pagination when filtering results