fixup trees a bit