fixup trees