Fixes getValue function for sliders