Bug fix OOIION-1315: pagination not working properly

@jamie-cyber1 Please review and merge.