limit the slider to the edges