fixed the editor bug that caused weird things to happen when cancelling an edit