Fixed a bug with non-crossfaded animation;

Code cleanup