Fix a problem with enum value writes