fixed animations when leaving container