Fixes the pagination in the results controller.