Fix pagination: upper bound off by 1.