repair error in delete