Fix crashes from racing conditions in animations