fixed tree exporting