Fix switch in editor and pen