fix pagination output