Some fixes in the generated code.