Fix a compiler bug which result in producing corrupt message
Return value 0 for unknown enum value string