Added proper interaction between buttons and slider.