Fix pagination for master
Merge pull request #3212 from fabn/pagination-fix-master

Fix pagination for master branch, refs #3211