Fix bug when sliding after autoplay