[#285] Added pagination fix

@zzgvh could you also take a look at this one?