Fixed error in codegen.