     this.updateSteps()
     @form.formwizard("show", step.name)
 
-  showStep: (step) ->
-    inputId = "_ht_link_to_#{step.fieldset}"
-    this.setHiddenInput "_ht_step_link", step.fieldset, inputId, @linkClass, this.currentStep()
+  showStep: (stepId) ->
+    inputId = "_ht_link_to_#{stepId}"
+    this.setHiddenInput "_ht_step_link", stepId, inputId, @linkClass, this.currentStep()
 
   formwizardEnabled: ->
     @form.formwizard?

      if hatTrick.metadata?.currentStep?.repeatOf?
        this.repeatStep(hatTrick.metadata.currentStep)
      else if hatTrick.metadata?.currentStep?
        this.showStep(hatTrick.metadata.currentStep)

$ ->
  $form = $("form.wizard")

    fieldsets = @form.find("fieldset")
    fieldsets.addClass("step")
    # prevent submitting the step that happens to be the last fieldset
    this.addDefaultButtons()
    this.addFakeLastStep()
    this.enableFormwizard()
    this.setCurrentStepField()
    this.bindEvents()

  linkClass: "_ht_link"

  buttons: {}

  addDefaultButtons: ($scope = @form.find("fieldset")) ->
    wizard_buttons = '<input type="reset" /><input type="submit" />'
    $scope.find("div.buttons").prepend wizard_buttons

  findStep: (stepId) ->
    @form.find("fieldset##{stepId}")
