bug fix for animation