Fix some memory-problems in AnimationHelper