Bugfix in delete_tree.