correcting uncompilable code produced by new generator