diff --git a/CHANGELOG.markdown b/CHANGELOG.markdown
--- a/CHANGELOG.markdown
+++ b/CHANGELOG.markdown
@@ -1,10 +1,13 @@
-0.3
-Fixed name parsing (for attributes and tags) so it conforms with the XML spec (qrilka)
-Fixed parsing failure when root tag is preceded by white space (though without checking for white space characters specifically) (qrilka)
-Added contribution guidelines (ocramz)	
+	0.3.2
+	Fixed DOM parsing from bystrings with non-zero offset (qrilka)
+	
+	0.3
+	Fixed name parsing (for attributes and tags) so it conforms with the XML spec (qrilka)
+	Fixed parsing failure when root tag is preceded by white space (though without checking for white space characters specifically) (qrilka)
+	Added contribution guidelines (ocramz)	
 
-0.2
-Added CDATA support (Rembane)	
+	0.2
+	Added CDATA support (Rembane)	
 
-0.1
-First Hackage release
+	0.1
+	First Hackage release
diff --git a/src/Xeno/DOM.hs b/src/Xeno/DOM.hs
--- a/src/Xeno/DOM.hs
+++ b/src/Xeno/DOM.hs
@@ -138,6 +138,7 @@
           -- characters
           Just 0x1 -> go (n+3)
           _ -> Nothing
+    PS _ offset0 _ = str
     node =
       runST
         (do nil <- UMV.new 1000
@@ -162,7 +163,7 @@
                     writeRef sizeRef (index + 5)
                  do UMV.write v' index tag
                     UMV.write v' (index + 1) tag_parent
-                    UMV.write v' (index + 2) name_start
+                    UMV.write v' (index + 2) (name_start - offset0)
                     UMV.write v' (index + 3) name_len
                     UMV.write v' (index + 4) tag_end)
               (\(PS _ key_start key_len) (PS _ value_start value_len) -> do
@@ -178,9 +179,9 @@
                  let tag = 0x02
                  do writeRef sizeRef (index + 5)
                  do UMV.write v' index tag
-                    UMV.write v' (index + 1) key_start
+                    UMV.write v' (index + 1) (key_start - offset0)
                     UMV.write v' (index + 2) key_len
-                    UMV.write v' (index + 3) value_start
+                    UMV.write v' (index + 3) (value_start - offset0)
                     UMV.write v' (index + 4) value_len)
               (\_ -> return ())
               (\(PS _ text_start text_len) -> do
@@ -196,7 +197,7 @@
                           return v'
                  do writeRef sizeRef (index + 3)
                  do UMV.write v' index tag
-                    UMV.write v' (index + 1) text_start
+                    UMV.write v' (index + 1) (text_start - offset0)
                     UMV.write v' (index + 2) text_len)
               (\_ -> do
                  v <- readSTRef vecRef
@@ -220,7 +221,7 @@
                           return v'
                  do writeRef sizeRef (index + 3)
                  do UMV.write v' index tag
-                    UMV.write v' (index + 1) cdata_start
+                    UMV.write v' (index + 1) (cdata_start - offset0)
                     UMV.write v' (index + 2) cdata_len)
               str
             wet <- readSTRef vecRef
diff --git a/test/Main.hs b/test/Main.hs
--- a/test/Main.hs
+++ b/test/Main.hs
@@ -5,6 +5,7 @@
 module Main where
 
 import           Data.ByteString (ByteString)
+import qualified Data.ByteString as BS
 import           Test.Hspec
 import           Xeno.SAX
 import           Xeno.DOM
@@ -41,6 +42,11 @@
           let docWithPrologue = "<?xml version=\"1.1\"?>\n<greeting>Hello, world!</greeting>"
               parsedRoot = fromRightE $ Xeno.DOM.parse docWithPrologue
           name parsedRoot `shouldBe` "greeting"
+
+        it "DOM from bytestring substring" $ do
+          let substr = BS.drop 5 "5<8& <valid>xml<here/></valid>"
+              parsedRoot = fromRightE $ Xeno.DOM.parse substr
+          name parsedRoot `shouldBe` "valid"
 
         -- If this works without crashing we're happy.
         let nsdoc = "<ns:tag os:attr=\"Namespaced attribute value\">Content.</ns:tag>"
diff --git a/xeno.cabal b/xeno.cabal
--- a/xeno.cabal
+++ b/xeno.cabal
@@ -1,5 +1,5 @@
 name: xeno
-version: 0.3.1
+version: 0.3.2
 synopsis: A fast event-based XML parser in pure Haskell
 description: Please see README.md          
 build-type: Simple
