fix slide position error when the infiniteLoop is enabled.