correct bug in tree