First attempt to fix bug of scrolling