               @switch_question( next_index, advancing )
               return
 
-          # Hide the current question, show the next question
+          # We've found the next question, so hide the current question, show
+          # the next one, and update the controls.
           @hide_question current_question
           @show_question next_question
-
-          # Update progress bar
+          @currentQuestionIndex = next_index
           @update_progress_bar(next_index)
-
-
-          @currentQuestionIndex = next_index
           @_display_form_buttons(@currentQuestionIndex)
 
           #Start the Geopoint display if geopoint


        switch_question: ( next_index, advancing ) ->
          #TODO: if in group, test relevance/constraint for all children

          next_index = 0 if next_index < 0

          # Does the current active question pass our constraints?
          if advancing
            return unless @passes_question_constraints()

          current_question = document.flat_fields[@currentQuestionIndex]
          return if not current_question

          if current_question.type is 'group' and next_index isnt -1
            #TODO: check if group is field-list or not first
            if advancing
              next_index = next_index + current_question.children.length

          next_question = document.flat_fields[next_index]
          if not advancing
            #is current question within group
            group = @get_group_for_question(next_question)
            if group
              next_index = next_index - group.children.length
              next_question = document.flat_fields[next_index]

          if not next_question
            @update_progress_bar(next_index)
            @_display_form_buttons(next_index)
            return

          #Is this question relevant?  Or, is this question an equation?
          if (next_question.bind and next_question.bind.calculate != null) or not
            XFormConstraintChecker.isRelevant( next_question, @queryStringToJSON($( ".form" ).serialize()) )
              # If its a calculation, calculate it!
              $("#" + next_question.name).val _performCalcluate(next_question.bind.calculate)  if next_question.bind and next_question.bind.calculate

              # Switch to the next question!
              if advancing

            @current_language = @set_current_language()

            @repopulateForm()
            @show_first_question()
            @

        show_first_question: ->
          first_question = document.flat_fields[0]
          @toggle_question(first_question, false)
          @_display_form_buttons(0)


        change_language: (language) ->
          @currentLanguage = language
