Fix write_tree encoding problem