Fixed bugs with animations