Use ws_enum_decode function wherever possible