fixed editor bug that had strange behavior on discarding edits