fix temp control and improve calibration