fixes for animation restarts and memory reductions