Fix calibration flags while setting gains