fixing minor pagination bugs