Fix a few things for Pagination

Signed-off-by: Graham Campbell <graham@mineuk.com>
Merge pull request #6071 from GrahamCampbell/5.0-pagination

[5.0] Fix A Few Things For Pagination