diff --git a/js/misc/_vertical-tabs.js b/js/misc/_vertical-tabs.js
index 69d188f..3127260 100644
--- a/js/misc/_vertical-tabs.js
+++ b/js/misc/_vertical-tabs.js
@@ -43,8 +43,8 @@ Drupal.behaviors.verticalTabs = {
         if ($(this).find('legend a').length) {
           $(this).find('legend').append('<div class="panel-title fieldset-legend">' + $(this).find('legend a').html() + '</div>');
           $(this).find('legend a').remove();
-          $(this).append($(this).find('.panel-collapse').html());
-          $(this).find('.panel-collapse').remove();
+          $(this).append($(this).children('.panel-collapse').html());
+          $(this).children('.panel-collapse').remove();
         }
         if (this.id == focusID) {
           tab_focus = $(this);
