Fix generated code error