minor changes to code generator