fixes model_parameters logic