Made slider work with custom buttons