fixed codegen_simple