fix gain backprop