diff --git a/NEWS b/NEWS
index b366006f0d6474076d8c29ff8e4767098d6d28a3_TkVXUw==..27122f4c8bc3c191909e7c1bcc0c8646275f372d_TkVXUw== 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- Fix issues when there is no analytic structure
+
 analytic_structure 1.9
 
 - Add License and Copyright (AGPL & XCG)
diff --git a/analytic_structure.py b/analytic_structure.py
index b366006f0d6474076d8c29ff8e4767098d6d28a3_YW5hbHl0aWNfc3RydWN0dXJlLnB5..27122f4c8bc3c191909e7c1bcc0c8646275f372d_YW5hbHl0aWNfc3RydWN0dXJlLnB5 100644
--- a/analytic_structure.py
+++ b/analytic_structure.py
@@ -308,7 +308,7 @@
                         attrs[attr] = value
                     parent.append(etree.Element('field', attrs))
 
-                parent.extend(next_children)
+            parent.extend(next_children)
 
         view['arch'] = etree.tostring(doc)