fix the edit bug