Fix bug, if editor is not allowed editor will be terminated