Fix a bug with object tree.