some fixes on tree