code generator bugfix