Fix a small error in pagination