Convert enumerations in functions