fixed error with remove_tree