Added check for triggering autoPlay only when slider is executed