Stub generation fixes
Merge pull request #622 from rzajac/stub-generator

Stub generation fixes