diff --git a/typo3/sysext/backend/Classes/Form/Element/GroupElement.php b/typo3/sysext/backend/Classes/Form/Element/GroupElement.php
index 8b723a44b071b49f2e1d7b3e6cde15be602a56e8..9e64c3f1b30b11f28b0337dbdd52b8a5cc689ed6 100644
--- a/typo3/sysext/backend/Classes/Form/Element/GroupElement.php
+++ b/typo3/sysext/backend/Classes/Form/Element/GroupElement.php
@@ -348,9 +348,9 @@ class GroupElement extends AbstractFormElement
                 $html[] =               $this->iconFactory->getIcon('actions-selection-delete', Icon::SIZE_SMALL)->render();
                 $html[] =           '</a>';
             }
+            $html[] =           '</div>';
+            $html[] =       '</div>';
         }
-        $html[] =           '</div>';
-        $html[] =       '</div>';
         if ($fieldControlHtml !== '') {
             $html[] =       '<div class="form-wizards-items-aside form-wizards-items-aside--field-control">';
             $html[] =           '<div class="btn-group-vertical">';