Fixed generated code