More corrections to generated code