this fixes #10 value reach the minimum when value is 0