fixed pagination problem with changing row counts