diff --git a/fltk-master.zip b/fltk-master.zip
# file too large to diff: fltk-master.zip
diff --git a/fltkhs.cabal b/fltkhs.cabal
--- a/fltkhs.cabal
+++ b/fltkhs.cabal
@@ -1,5 +1,5 @@
 name : fltkhs
-version : 0.7.0.1
+version : 0.7.0.2
 synopsis : FLTK bindings
 description: Low level bindings for the FLTK GUI toolkit. For installation and quick start instruction please scroll all the way down to the README.
 license : MIT
diff --git a/src/Graphics/UI/FLTK/LowLevel/SVGImage.chs b/src/Graphics/UI/FLTK/LowLevel/SVGImage.chs
--- a/src/Graphics/UI/FLTK/LowLevel/SVGImage.chs
+++ b/src/Graphics/UI/FLTK/LowLevel/SVGImage.chs
@@ -32,11 +32,12 @@
   checkImage ref'
 
 svgImageNew :: B.ByteString -> IO (Either UnknownError (Ref SVGImage))
-svgImageNew svgData' = do
-  dataPtr <- copyByteStringToCString svgData'
-  ptr <- svgImageNewWithData' (castPtr nullPtr) dataPtr
-  ref' <- (toRef ptr :: IO (Ref SVGImage))
-  checkImage ref'
+svgImageNew svgData' =
+  B.useAsCString svgData' (\dataPtr -> do
+    ptr <- svgImageNewWithData' (castPtr nullPtr) dataPtr
+    ref' <- (toRef ptr :: IO (Ref SVGImage))
+    checkImage ref'
+  )
 
 {# fun Fl_SVG_Image_Destroy as flImageDestroy' { id `Ptr ()' } -> `()' id #}
 instance (impl ~ (IO ())) => Op (Destroy ()) SVGImage orig impl where
