fix incorrect scrolling behavior