fixed a minor bug in scrolling