Fix infinite scroll on resize