Some bugs in gain calibration mode have been fixed