fix edit method