diff --git a/application/source/template/prepare.go b/application/source/template/prepare.go
index 6da81c01ff429f478b0114e39245e504f2a17c2e..038bf359664b9cfd156b91ca51b44378ea68f024 100644
--- a/application/source/template/prepare.go
+++ b/application/source/template/prepare.go
@@ -278,6 +278,19 @@ func prepareTextNodes(node *html.Node, storage *types.PageData) {
 
 func runNodes(n *html.Node, storage *types.PageData) {
 
+	nodeList := []*html.Node{}
+	for c := n.FirstChild; c != nil; c = c.NextSibling {
+		nodeList = append(nodeList, c)
+	}
+
+	for _, n := range nodeList {
+		checkNodes(n, storage)
+		runNodes(n, storage)
+	}
+
+}
+
+func checkNodes(n *html.Node, storage *types.PageData) {
 	if n.Parent != nil {
 		if n.Parent.Type == html.ElementNode {
 			if n.Parent.Data == "script" || n.Parent.Data == "style" {
@@ -286,49 +299,44 @@ func runNodes(n *html.Node, storage *types.PageData) {
 		}
 	}
 
-	if n.Type == html.TextNode {
+	if n.Type != html.TextNode {
+		return
+	}
 
-		content := strings.TrimSpace(n.Data)
-		if content == "" {
-			return
-		}
+	content := strings.TrimSpace(n.Data)
+	if content == "" {
+		return
+	}
 
-		id, err := util.BuildTextKey(content)
-		if err != nil {
-			id = util.GetNextId()
-		}
+	id, err := util.BuildTextKey(content)
+	if err != nil || id == "" {
+		id = util.GetNextId()
+	}
 
-		parent := n.Parent
-		span := &html.Node{
-			Type: html.ElementNode,
-			Data: atom.Span.String(),
-			Attr: []html.Attribute{
-				{
-					Key: "id",
-					Val: id,
-				},
-				{
-					Key: "data-replace-self",
-					Val: "path:text." + id + ".text",
-				},
+	parent := n.Parent
+	span := &html.Node{
+		Type: html.ElementNode,
+		Data: atom.Span.String(),
+		Attr: []html.Attribute{
+			{
+				Key: "id",
+				Val: id,
 			},
-		}
-		parent.InsertBefore(span, n)
-		parent.RemoveChild(n)
-
-		span.AppendChild(n)
-
-		storage.Text = append(storage.Text, types.Text{
-			Id:   id,
-			Text: content,
-		})
-
-		return
+			{
+				Key: "data-replace-self",
+				Val: "path:text." + id + ".text",
+			},
+		},
 	}
+	parent.InsertBefore(span, n)
+	parent.RemoveChild(n)
 
-	for c := n.FirstChild; c != nil; c = c.NextSibling {
-		runNodes(c, storage)
-	}
+	span.AppendChild(n)
+
+	storage.Text = append(storage.Text, types.Text{
+		Id:   id,
+		Text: content,
+	})
 
 }
 
diff --git a/development/examples/example1/original/test4.html b/development/examples/example1/original/test4.html
new file mode 100644
index 0000000000000000000000000000000000000000..a29b556c3aee0f8d6c5206a37c76fc8e70a857ec
--- /dev/null
+++ b/development/examples/example1/original/test4.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html><html lang="en"><head>
+
+</head>
+
+<body>
+
+<main>
+
+<p>Das ist ein Text <a href="a.html">one-time password</a>.</p>
+</main>
+
+</body></html>
\ No newline at end of file
diff --git a/development/examples/example1/template/data.yaml b/development/examples/example1/template/data.yaml
index 4eaf644da44d3ae87fbcd264b6d362c3f6de736a..2f5a7f024bf673c0deaef91d708d6e12ba498936 100755
--- a/development/examples/example1/template/data.yaml
+++ b/development/examples/example1/template/data.yaml
@@ -18,12 +18,10 @@ test1.html:
           href: /test.html
           hreflang: ""
           title: test-link
-          content: ""
         - id: yes-a-html
           href: /a.html
           hreflang: ""
           title: "Yes"
-          content: ""
     text:
         - text: test-link
           id: test-link
@@ -33,6 +31,10 @@ test1.html:
           id: the-request-was-inco-2640993422
         - text: Try submitting your
           id: try-submitting-your
+        - text: request
+          id: request
+        - text: again (sometimes this helps).
+          id: again-sometimes-this-2086042570
         - text: Contact support if you continue to have problems.
           id: contact-support-if-y-3404332025
         - text: |-
@@ -70,7 +72,6 @@ test2.html:
           href: /a.html
           hreflang: ""
           title: "Yes"
-          content: ""
     text:
         - text: Bad xxxx
           id: bad-xxxx
@@ -78,6 +79,10 @@ test2.html:
           id: the-request-was-inco-2640993422
         - text: Try submitting your
           id: try-submitting-your
+        - text: request
+          id: request
+        - text: again (sometimes this helps).
+          id: again-sometimes-this-2086042570
         - text: Contact support if you continue to have problems.
           id: contact-support-if-y-3404332025
         - text: |-
@@ -107,7 +112,6 @@ test3.html:
           href: /a.html
           hreflang: ""
           title: "Yes"
-          content: ""
     text:
         - text: Bad xxxx
           id: bad-xxxx
@@ -115,6 +119,10 @@ test3.html:
           id: the-request-was-inco-2640993422
         - text: Try submitting your
           id: try-submitting-your
+        - text: request
+          id: request
+        - text: again (sometimes this helps).
+          id: again-sometimes-this-2086042570
         - text: Contact support if you continue to have problems.
           id: contact-support-if-y-3404332025
         - text: |-
@@ -124,3 +132,22 @@ test3.html:
         - text: 'You   can   try    the following steps:'
           id: you-can-try-the-foll-3363859033
     translations: []
+test4.html:
+    export: en/test4.html
+    lang: en
+    title: ""
+    meta: {}
+    images: []
+    anchors:
+        - id: a-html
+          href: a.html
+          hreflang: ""
+          title: ""
+    text:
+        - text: Das ist ein Text
+          id: das-ist-ein-text
+        - text: one-time password
+          id: one-time-password
+        - text: .
+          id: id1000
+    translations: []
diff --git a/development/examples/example1/template/test1.html b/development/examples/example1/template/test1.html
index a978fb5b34a4b00465f3b1f5c1f43f1a1b02c111..5ce870e0438e1594c78d54b60e4b21c7446ad809 100644
--- a/development/examples/example1/template/test1.html
+++ b/development/examples/example1/template/test1.html
@@ -55,7 +55,7 @@
 <monster-state>
     <img width="16" height="16" alt="tick" title="yes" src="data:image/gif;base64,R0lGODdhEAAQAMwAAPj7+FmhUYjNfGuxYYDJdYTIeanOpT+DOTuANXi/bGOrWj6CONzv2sPjv2Cm
   V1unU4zPgI/Sg6DJnJ3ImTh8Mtbs00aNP1CZSGy0YqLEn47RgXW8amasW7XWsmmvX2iuXiwAAAAAEAAQAAAFVyAgjmRpnihqGCkpDQ
-  PbGkNUOFk6DZqgHCNGg2T4QAQBoIiRSAwBE4VA4FACKgkB5NGReASFZEmxsQ0whPDi9BiACYQAInXhwOUtgCUQoORFCGt/g4QAIQA7" id="tickyesdata-image-gi-4013311193" data-attributes="alt path:content.tickyesdata-image-gi-4013311193.alt,src path:content.tickyesdata-image-gi-4013311193.src,title path:content.tickyesdata-image-gi-4013311193.title"/>
+  PbGkNUOFk6DZqgHCNGg2T4QAQBoIiRSAwBE4VA4FACKgkB5NGReASFZEmxsQ0whPDi9BiACYQAInXhwOUtgCUQoORFCGt/g4QAIQA7" id="tickyesdata-image-gi-4013311193" data-attributes="src path:content.tickyesdata-image-gi-4013311193.src,alt path:content.tickyesdata-image-gi-4013311193.alt,title path:content.tickyesdata-image-gi-4013311193.title"/>
     <h1 class="deco"><span id="bad-xxxx" data-replace-self="path:text.bad-xxxx.text">Bad xxxx</span></h1>
     <p><span id="the-request-was-inco-2640993422" data-replace-self="path:text.the-request-was-inco-2640993422.text">The request was incorrect, the server could not process it.
     </span></p><p>
@@ -64,7 +64,7 @@
 
         <ul>
 
-            <li><span id="try-submitting-your" data-replace-self="path:text.try-submitting-your.text">Try submitting your </span><a href="/a.html" title="Yes" id="yes-a-html" data-attributes="title path:anchors.yes-a-html.title,href path:anchors.yes-a-html.href,hreflang path:anchors.yes-a-html.hreflang">request</a> again (sometimes this helps).</li>
+            <li><span id="try-submitting-your" data-replace-self="path:text.try-submitting-your.text">Try submitting your </span><a href="/a.html" title="Yes" id="yes-a-html" data-attributes="href path:anchors.yes-a-html.href,title path:anchors.yes-a-html.title,hreflang path:anchors.yes-a-html.hreflang"><span id="request" data-replace-self="path:text.request.text">request</span></a><span id="again-sometimes-this-2086042570" data-replace-self="path:text.again-sometimes-this-2086042570.text"> again (sometimes this helps).</span></li>
             <li><span id="contact-support-if-y-3404332025" data-replace-self="path:text.contact-support-if-y-3404332025.text">Contact support if you continue to have problems.</span></li>
 
             <li><span id="if-you-received-this-423958995" data-replace-self="path:text.if-you-received-this-423958995.text">If you received this message as a result of a request to the server API, then check the structure
diff --git a/development/examples/example1/template/test2.html b/development/examples/example1/template/test2.html
index 223887fa88417e2d3dea1a8c8bfb80084bdffd99..bbde8eb6c4e91c582f94b81d9f0196c282c4a17a 100644
--- a/development/examples/example1/template/test2.html
+++ b/development/examples/example1/template/test2.html
@@ -48,7 +48,7 @@
 
         <ul>
 
-            <li><span id="try-submitting-your" data-replace-self="path:text.try-submitting-your.text">Try submitting your </span><a href="/a.html" title="Yes" id="yes-a-html" data-attributes="href path:anchors.yes-a-html.href,title path:anchors.yes-a-html.title,hreflang path:anchors.yes-a-html.hreflang">request</a> again (sometimes this helps).</li>
+            <li><span id="try-submitting-your" data-replace-self="path:text.try-submitting-your.text">Try submitting your </span><a href="/a.html" title="Yes" id="yes-a-html" data-attributes="href path:anchors.yes-a-html.href,title path:anchors.yes-a-html.title,hreflang path:anchors.yes-a-html.hreflang"><span id="request" data-replace-self="path:text.request.text">request</span></a><span id="again-sometimes-this-2086042570" data-replace-self="path:text.again-sometimes-this-2086042570.text"> again (sometimes this helps).</span></li>
             <li><span id="contact-support-if-y-3404332025" data-replace-self="path:text.contact-support-if-y-3404332025.text">Contact support if you continue to have problems.</span></li>
 
             <li><span id="if-you-received-this-423958995" data-replace-self="path:text.if-you-received-this-423958995.text">If you received this message as a result of a request to the server API, then check the structure
diff --git a/development/examples/example1/template/test3.html b/development/examples/example1/template/test3.html
index b374b703610a05c7b1e8032926bc84aa1945e756..c7514f32df9a0f1d30ae63a73af1d8846637b645 100644
--- a/development/examples/example1/template/test3.html
+++ b/development/examples/example1/template/test3.html
@@ -39,7 +39,7 @@
 <monster-state>
     <img width="16" height="16" alt="tick" title="yes" src="data:image/gif;base64,R0lGODdhEAAQAMwAAPj7+FmhUYjNfGuxYYDJdYTIeanOpT+DOTuANXi/bGOrWj6CONzv2sPjv2Cm
   V1unU4zPgI/Sg6DJnJ3ImTh8Mtbs00aNP1CZSGy0YqLEn47RgXW8amasW7XWsmmvX2iuXiwAAAAAEAAQAAAFVyAgjmRpnihqGCkpDQ
-  PbGkNUOFk6DZqgHCNGg2T4QAQBoIiRSAwBE4VA4FACKgkB5NGReASFZEmxsQ0whPDi9BiACYQAInXhwOUtgCUQoORFCGt/g4QAIQA7" id="tickyesdata-image-gi-4013311193" data-attributes="alt path:content.tickyesdata-image-gi-4013311193.alt,src path:content.tickyesdata-image-gi-4013311193.src,title path:content.tickyesdata-image-gi-4013311193.title"/>
+  PbGkNUOFk6DZqgHCNGg2T4QAQBoIiRSAwBE4VA4FACKgkB5NGReASFZEmxsQ0whPDi9BiACYQAInXhwOUtgCUQoORFCGt/g4QAIQA7" id="tickyesdata-image-gi-4013311193" data-attributes="src path:content.tickyesdata-image-gi-4013311193.src,alt path:content.tickyesdata-image-gi-4013311193.alt,title path:content.tickyesdata-image-gi-4013311193.title"/>
     <h1 class="deco"><span id="bad-xxxx" data-replace-self="path:text.bad-xxxx.text">Bad xxxx</span></h1>
     <p><span id="the-request-was-inco-2640993422" data-replace-self="path:text.the-request-was-inco-2640993422.text">The request was incorrect, the server could not process it.
     </span></p><p>
@@ -48,7 +48,7 @@
 
         <ul>
 
-            <li><span id="try-submitting-your" data-replace-self="path:text.try-submitting-your.text">Try submitting your </span><a href="/a.html" title="Yes" id="yes-a-html" data-attributes="href path:anchors.yes-a-html.href,title path:anchors.yes-a-html.title,hreflang path:anchors.yes-a-html.hreflang">request</a> again (sometimes this helps).</li>
+            <li><span id="try-submitting-your" data-replace-self="path:text.try-submitting-your.text">Try submitting your </span><a href="/a.html" title="Yes" id="yes-a-html" data-attributes="href path:anchors.yes-a-html.href,title path:anchors.yes-a-html.title,hreflang path:anchors.yes-a-html.hreflang"><span id="request" data-replace-self="path:text.request.text">request</span></a><span id="again-sometimes-this-2086042570" data-replace-self="path:text.again-sometimes-this-2086042570.text"> again (sometimes this helps).</span></li>
             <li><span id="contact-support-if-y-3404332025" data-replace-self="path:text.contact-support-if-y-3404332025.text">Contact support if you continue to have problems.</span></li>
 
             <li><span id="if-you-received-this-423958995" data-replace-self="path:text.if-you-received-this-423958995.text">If you received this message as a result of a request to the server API, then check the structure
diff --git a/development/examples/example1/template/test4.html b/development/examples/example1/template/test4.html
new file mode 100644
index 0000000000000000000000000000000000000000..e0ad769ea7987cf79fea20a340619d4ce39fe017
--- /dev/null
+++ b/development/examples/example1/template/test4.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html><html lang="en" data-attributes="lang path:lang"><head>
+
+</head>
+
+<body>
+
+<main>
+
+<p><span id="das-ist-ein-text" data-replace-self="path:text.das-ist-ein-text.text">Das ist ein Text </span><a href="a.html" id="a-html" data-attributes="href path:anchors.a-html.href,title path:anchors.a-html.title,hreflang path:anchors.a-html.hreflang"><span id="one-time-password" data-replace-self="path:text.one-time-password.text">one-time password</span></a><span id="id1000" data-replace-self="path:text.id1000.text">.</span></p>
+</main>
+
+</body></html>
\ No newline at end of file