Fixes to calibration