fix pagination in search