current_gain_type was not being set when load_gains was called meaning subsequent calls to load_gains would fail if gain_type was GAIN_ORIGINAL