Fix incorrect code in hs_calibrate