Fix pagination glitch