Close(): double free corruption fix