Bug fixes for animations