minor changes in CodeGenerator
issues fixed