fixing scrolling bug