Correcting error in TreeClass