fixing pagination corner cases on single page results