fixed edge case animation bug