fix edit/delete bug