fix for enum handling broken by bbb4b5e2f4974e30da3091bf4bb9d784465daf47