Correct pagination on the search page