Corrected bug in infinite scroll