fixed edit bug