Fixed a crash due to a memory leak in Animations mode.