corrected typo in ComputeGain