diff --git a/src/HtmlPageCrawler.php b/src/HtmlPageCrawler.php
index <HASH>..<HASH> 100644
--- a/src/HtmlPageCrawler.php
+++ b/src/HtmlPageCrawler.php
@@ -808,7 +808,7 @@ class HtmlPageCrawler extends Crawler
         /** @var \DOMNode $newnode */
         $newnode = static::importNewnode($newnode, $parent);
 
-        $parent->appendChild($newnode);
+        $newnode = $parent->insertBefore($newnode,$this->getNode(0));
         $content->clear();
         $content->add($newnode);
Wrapped nodes retains position of first node in list