fix the scrolling bug