fix line scrolling bug