fix buggy animation