fix some problems with infinite scroll and loading