Bugfixes in fit_profile.