some correction of local variable delete