Finally fixed pagination issues from the last few commits