Fix model creation