fix scrolling-related bug