big fix in the model generation