Many fixes in AnimationTask.java