Fix bug for smooth scrolling on Firefox