Finally solved the animation callback problems.