Fixed an upscroll/downscroll bug