commiting few changes to animation logic
Some fixes for animation.