Fixed 2 minor bugs in the animation tween logic.