Fixed error when enum value has wrong formatting.