Fix parameter order in call to to_class for enums