fix for casadi getting fields by string instead of enum