fix bug with animation