Use more smooth scrolling effect
Fix the race condition issue