fixed the auto-scrolling feature