Updates the min or max value when set(value) is out of bounds

When the value given in "set" method is out of bounds, I encountered an error : 
![image](https://f.cloud.github.com/assets/932583/1009467/4df11320-0b39-11e3-9608-80dda0f1502e.png)

I added just a few lines to updates the minValue and the maxValue when it's needed.