Solved pagination issue