Some bug fixes for the animator class.