correcting codegenerator