bugfix for fitting in calibration