fixing pagination reset