Fix setEditorState bug