fix bugs in gauge calibrate and accum aggregate