Bugfix for scrolling code