fixed calibration bug