Model generator wrong with traits.