Fix error on scrolling computation