fix pagination issue