Added protection from setting incorrect values to gauges

Gauges will not go out of borders