fix code_generation