diff --git a/generateChangemarks/changemarks.py b/generateChangemarks/changemarks.py
index 7432ab085a71c78c5f389e37dac56ba832fe8a1c..f906c990bcf2821cc3340e4da34798d168d2bc97 100644
--- a/generateChangemarks/changemarks.py
+++ b/generateChangemarks/changemarks.py
@@ -90,8 +90,16 @@ def find_all_clauses(progress:Progress, mdLines:list[str]):
 
     index = 1
     empty = ""
-    clause = Clause(empty,0,0,empty)
-    
+    clause = Clause(empty,0,0,"0")
+
+    for line in mdLines:
+        if line.startswith('#'):
+            # Clause 0 (from start to first clause) found
+            clause.to_id = index - 1
+            clauses.append(clause)
+            break
+        index = index + 1
+
     for line in mdLines:
         if line.startswith('#'):
             matches = re.findall(clauseregex, line)	# Match heading
@@ -310,6 +318,7 @@ def main(args=None):
     parser.add_argument('mergeID',      help="Merge IID")
 
     pargs = parser.parse_args()
+    logging.basicConfig(level=logging.DEBUG)
 
     # Process documents and print output