Fixes Bitbucket issue #299 : bug in generators