added support for terminating edits