fix pagination problem