Fix scroll-to-end bug.