Fixes glitches with dismissal animations.