fixed code generation error.