Improving result paging logic.