add safe delete.