minor fix for entity generation
Merge pull request #2235 from kurund/gencode

minor fix for entity generation