fixed pagination issues