fixed an issue with model generation