fixed pagination issue