what if lastVal is 0 and minValue is below 0?