Fix for issue when slider is hidden initially