Fixed tree creating bug.