         # projectPreferences.update "preferences": {}
         # projectPreferences.save()
         if projectPreferences.preferences.minicourses?
+          console.log('projectPreferences')
           if projectPreferences.preferences.minicourses.opt_out["id_#{@props.minicourse.id}"] # user is restarting via mini-course button
+            console.log('defaultPreferences', defaultPreferences)
             projectPreferences.update defaultPreferences
             projectPreferences.save()
               .then =>
-                slideToStart = projectPreferences.preferences.minicourses.slide_last_seen["id_#{@props.minicourse.id}"]
+                slideToStart = 0
                 @setState {slideToStart: slideToStart, projectPreferences: projectPreferences}
-          else if projectPreferences.preferences.minicourses.slide_last_seen["id_#{@props.minicourse.id}"]?
+          else if projectPreferences.preferences.minicourses.slide_last_seen["id_#{@props.minicourse.id}"] >= @props.minicourse.steps.length
+            slideToStart = 0
+            @setState {slideToStart: slideToStart, projectPreferences: projectPreferences}
+          else
             slideToStart = projectPreferences.preferences.minicourses.slide_last_seen["id_#{@props.minicourse.id}"]
             @setState {slideToStart: slideToStart, projectPreferences: projectPreferences}
         else

            </p>}
        </MediaCard>}
    </StepThrough>


          awaitMiniCourseMedia.then (mediaByID) =>
            Dialog.alert(<MiniCourseComponent project={project} user={user} minicourse={minicourse} media={mediaByID} />, {
              className: 'tutorial-dialog', #reusing tutorial styling
              required: true,
              closeButton: true
              onSubmit: @handleOptOut.bind(null, project, user, minicourse.id)
