fix scrolling-to-bottom bug