Fix issue: animation started event fired too early