cleanups for mag calibration