diff --git a/Changelog.md b/Changelog.md
--- a/Changelog.md
+++ b/Changelog.md
@@ -1,5 +1,9 @@
 # Changelog for streamly-bytestring
 
+## 0.1.2
+
+* Fix memory bug in Strict.toArray
+
 ## 0.1.1
 
 * Add `fromChunksIO` function to `Streamly.External.ByteString.Lazy` module.
diff --git a/src/Streamly/External/ByteString.hs b/src/Streamly/External/ByteString.hs
--- a/src/Streamly/External/ByteString.hs
+++ b/src/Streamly/External/ByteString.hs
@@ -38,7 +38,7 @@
 toArray (PS fp off len) = Array nfp endPtr endPtr
   where
     nfp = fp `plusForeignPtr` off
-    endPtr = unsafeForeignPtrToPtr fp `plusPtr` len
+    endPtr = unsafeForeignPtrToPtr nfp `plusPtr` len
 
 -- | Convert an array of 'Word8' to a 'ByteString'. This function unwraps the
 -- 'Array' and wraps it with 'ByteString' constructors and hence the operation
diff --git a/streamly-bytestring.cabal b/streamly-bytestring.cabal
--- a/streamly-bytestring.cabal
+++ b/streamly-bytestring.cabal
@@ -7,7 +7,7 @@
 -- hash: af662f24c97fa6b630e84ef660885ad0de001dc9face27ef4698f5361e4e5484
 
 name:           streamly-bytestring
-version:        0.1.1
+version:        0.1.2
 synopsis:       Library for streamly and bytestring interoperation.
 description:    Please see the README on GitHub at <https://github.com/psibi/streamly-bytestring#readme>
 category:       Streamly, Stream, ByteString
diff --git a/test/Main.hs b/test/Main.hs
--- a/test/Main.hs
+++ b/test/Main.hs
@@ -4,11 +4,13 @@
 
 import Data.ByteString (ByteString)
 import Data.Word (Word8)
+import Foreign.ForeignPtr.Unsafe (unsafeForeignPtrToPtr)
 import GHC.IO.Handle (Handle)
+import GHC.Ptr (minusPtr)
 import System.Random (randomIO)
 import Streamly
+import Streamly.Internal.Memory.Array.Types (Array(..))
 import Streamly.FileSystem.Handle (readChunks)
-import Streamly.Memory.Array (Array)
 import System.IO (openFile, IOMode(ReadMode))
 import System.IO.Temp (withSystemTempFile)
 import Test.Hspec
@@ -92,6 +94,7 @@
         S.fromList (Strict.toArray (BS.singleton h) : undefined)
     return $ BSL.head lbs
 
+
 main :: IO ()
 main =
     hspec $ do
@@ -102,6 +105,13 @@
                     ([1 .. 100] :: [Int])
             prop "Strict Identity" $ \bs ->
                 bs `shouldBe` Strict.fromArray (Strict.toArray bs)
+            prop "Strict Identity (with offset)" $ \bs ->
+                let bs' = BS.drop 5 bs
+                in bs' `shouldBe` Strict.fromArray (Strict.toArray bs')
+            prop "toArray never produces negative length" $ \bs ->
+                -- 'BS.drop 5' to trigger non-zero offset
+                let (Array nfp endPtr _) = Strict.toArray (BS.drop 5 bs)
+                in (endPtr `minusPtr` unsafeForeignPtrToPtr nfp) >= 0 `shouldBe` True
             prop "Lazy Identity" $ \bs -> do
                 bs2 <- Lazy.fromChunks . Lazy.toChunks $ bs
                 bs `shouldBe` bs2
