Fix a bug with infinite scroll on firefox