Fixed a bug where triggering a new animation in response to another ending would not work