Fixed the edit bug