Fix concurrency issue FlashingAnimation.