Fixed a bug where opacity would set after animation.