patch for multi-line codegen bug