stopIfZeroGain in maximize() checks 0 as an Int instead of Float
stopIfZeroGain in maximize() checks 0 as an Int instead of Float