diff --git a/include/html2text.php b/include/html2text.php
index 1064fc5402748a29cc7804b888706719e7503bac..322342fe0325f3ea225d2a2dfbf209b68ec55a32 100644
--- a/include/html2text.php
+++ b/include/html2text.php
@@ -186,6 +186,7 @@ class HtmlInlineElement {
 
     function render($width, $options) {
         $output = '';
+        $after_block = false;
         $this->ws = $this->getStyle('white-space', 'normal');
         foreach ($this->children as $c) {
             if ($c instanceof DOMText) {
diff --git a/setup/test/tests/stubs.php b/setup/test/tests/stubs.php
index 2161f52117d3ad4a948eae9e4f03acafaf5f6e9e..5a78251f344216485656356b1c129ed2e1ab2b0d 100644
--- a/setup/test/tests/stubs.php
+++ b/setup/test/tests/stubs.php
@@ -31,6 +31,7 @@ class ReflectionClass {
 
 class DomNode {
     function hasChildNodes() {}
+    function removeChild() {}
 }
 
 class DomNodeList {