Fixed calculation for non Zero minimum.