Fix pagination issue