Fix pagination in search page