Fix pagination on doctrine query