Fix pagination after filtering

Fix issue where, if the user was on a page that, after filtering,
didn't exist anymore, the user would remain on that page even though it
didn't exist

Fixes #33