Add minor changes to code generator