Fix issue with paginator adding an extra page.