glgen2 EnumByVal change and fixes