Fix bug with incorrect scrolling