Bugfixing
Fix bug with model creation in generator