Fix layout measurements for correct animations.