fixed tree corruption