fixed bug with tree container destructor.