fix next button in pagination disappears on certain page

[``* `#15598 ` Next button in pagination disappears on certain page``](http://www.openproject.org/work_packages/15598)