Fix model creation
Merge branch 'r1411'