Check the end of the animation

Removes duplication of pos == 1 in the end of animation