fixing prevent scrolling bug