Fix pagination upper and lower bounds (following https://github.com/wolfgangmm/ShakespeareDemo/commit/a779105)