Fix edit bug