fixed guard editor/editor state