fix infinite scroll bug