Fix view animation glitch