bug fix for infinte scrolling with gif