Fix MinValue Calculation