Fixed calibrate bug