Fixes an animation bug