fix bug in scrolling