Fix copy-paste bug in horizontal scrolling code