Fix bug in slider