Bug fix with scrolling JS