Bugfix in generator