fix and model generation