Fixed #tree implementation.