prevent bugs while scrolling to the end of slider