diff --git a/multipage/multipage.js b/multipage/multipage.js
index 5e10691..306bf45 100644
--- a/multipage/multipage.js
+++ b/multipage/multipage.js
@@ -1,7 +1,7 @@
 (function ($) {
 
 /**
- * This script transforms a set of wrappers into a stack of multipage pages. 
+ * This script transforms a set of wrappers into a stack of multipage pages.
  * Another pane can be entered by clicking next/previous.
  *
  */
@@ -19,28 +19,17 @@ Drupal.behaviors.MultiPage = {
         return;
       }
 
-      // Create the next/previous controls.
-      var $controls;
-
       // Transform each div.multipage-pane into a multipage with controls.
       $panes.each(function () {
-        
-        $controls = $('<div class="multipage-controls-list"></div>');
-        $(this).append('<div class="multipage-controls clearfix"></div>').append($controls);
-        
-        // Check if the submit button needs to move to the latest pane.
-        if (Drupal.settings.field_group.multipage_move_submit && $('.form-actions').length) {
-          $('.form-actions', $form).remove().appendTo($($controls, $panes.last()));
-        }
-        
+        $(this).append('<div class="multipage-controls clearfix"></div>');
+
         var multipageControl = new Drupal.multipageControl({
           title: $('> .multipage-pane-title', this).text(),
           wrapper: $(this),
           has_next: $(this).next().length,
           has_previous: $(this).prev().length
         });
-        
-        $controls.append(multipageControl.item);
+
         $(this)
           .addClass('multipage-pane')
           .data('multipageControl', multipageControl);
@@ -48,9 +37,8 @@ Drupal.behaviors.MultiPage = {
         if (this.id == focusID) {
           paneWithFocus = $(this);
         }
-        
       });
-      
+
       if (!paneWithFocus) {
         // If the current URL has a fragment and one of the tabs contains an
         // element that matches the URL fragment, activate that tab.
@@ -78,18 +66,20 @@ Drupal.behaviors.MultiPage = {
  */
 Drupal.multipageControl = function (settings) {
   var self = this;
-  $.extend(this, settings, Drupal.theme('multipage', settings));
+  $.extend(this, settings);
 
-  this.nextLink.click(function () {
+  this.addControls();
+
+  this.wrapper.delegate('.multipage-link-next', 'click', function () {
     self.nextPage();
     return false;
   });
-  
-  this.previousLink.click(function () {
+
+  this.wrapper.delegate('.multipage-link-previous', 'click', function () {
     self.previousPage();
     return false;
   });
-  
+
 /*
   // Keyboard events added:
   // Pressing the Enter key will open the tab pane.
@@ -115,7 +105,18 @@ Drupal.multipageControl = function (settings) {
 };
 
 Drupal.multipageControl.prototype = {
-    
+
+  /**
+   * Add this control's widgets to the pane, or replace them
+   * if they already exist.
+   */
+  addControls: function () {
+    $controls = Drupal.theme('multipage', { has_next: this.has_next, has_previous: this.has_previous });
+    $.extend(this, $controls);
+    this.wrapper.find('.multipage-controls-list').remove();
+    this.wrapper.append($('<div class="multipage-controls-list"></div>').append($controls.item));
+  },
+
   /**
    * Displays the tab's content pane.
    */
@@ -130,18 +131,19 @@ Drupal.multipageControl.prototype = {
         .end()
       .siblings(':hidden.multipage-active-control')
         .val(this.wrapper.attr('id'));
+
     // Mark the active control for screen readers.
     $('#active-multipage-control').remove();
     this.nextLink.append('<span id="active-multipage-control" class="element-invisible">' + Drupal.t('(active page)') + '</span>');
   },
-  
+
   /**
    * Continues to the next page or step in the form.
    */
   nextPage: function () {
     this.wrapper.next().data('multipageControl').focus();
   },
-  
+
   /**
    * Returns to the previous page or step in the form.
    */
@@ -210,6 +212,9 @@ Drupal.theme.prototype.multipage = function (settings) {
   controls.item.append(controls.previousLink = $('<a class="multipage-link-previous" href="#"></a>'));
   if (!settings.has_next) {
     controls.nextLink.hide();
+    if (Drupal.settings.field_group.multipage_move_submit && $('.form-actions').length) {
+      controls.item.append($('.form-actions', $form).remove());
+    }
   }
   if (settings.has_previous) {
     controls.previousLink.append(controls.previousTitle = $('<strong></strong>').text(Drupal.t('Previous')));
