Pr/bug pager

this should fix the pagination problem. TEST ADDED.