fix bug in slider