Fixed a bug with delayed animations