minor optimization for enum writes