Fix end of scrolling bug