Fixed typos in model creation logic.