Fixed edit bug