Finally fixing pagination