fixing the slider bug