Fixed bug for infinite scroll