Bug fix for infinite scroll