Corrected division in the gain scaling