Fixes for new version of codegen
Merge pull request #2 from spekary/master

bugfix-NewCodeGen