fixed up code generator issues