Fix pagination once and for all