Draft: Fixed bug in Edit tool