Fixing ExtendTree method