Fix minor regression in pagination