Properly handle scrolling.