fixed bug when handling init and anim events for global animations