Fixed infinite scrolling problem, but still have errors with gaps