Fix bug with incorrect scrolling while returning