Fixed bug with infinite scrolling