fix edit bug