fixing saving editor state