bug fix for infinte scrolling