Fix pagination bug when used on static front.