fixed the delete-tree responsive function