Fix a invalid sprite frame when animation is changed (fix #26).