Slider - fixed value always max on setRange

When changing the range of a slider it would always change the value of the slider to the max of the range.