Fix bug in fit_params assumed to be an array