pagination bug fix. there should be no more pagination bugs