diff --git a/IHaskell/Display/Magic.hs b/IHaskell/Display/Magic.hs
--- a/IHaskell/Display/Magic.hs
+++ b/IHaskell/Display/Magic.hs
@@ -14,6 +14,7 @@
 
 import qualified Data.Text as T
 import qualified Data.Text.Encoding as T
+import IHaskell.IPython.Types (MimeType(MimeSvg))
 import Data.ByteString.UTF8
 
 instance IHaskellDisplay T.Text where
@@ -30,9 +31,9 @@
 b64 = Char.unpack . Base64.encode
 
 withClass :: MagicClass -> B.ByteString -> DisplayData
-withClass SVG = svg . B.toString
-withClass (PNG w h) = png w h . Base64.encode
-withClass JPG = jpg 400 300 . Base64.encode
+withClass SVG = DisplayData MimeSvg . T.decodeUtf8
+withClass (PNG w h) = png w h . T.decodeUtf8 . Base64.encode
+withClass JPG = jpg 400 300 . T.decodeUtf8 . Base64.encode
 withClass HTML = html . B.toString 
 withClass LaTeX = latex . B.toString
 withClass _ = plain . B.toString
diff --git a/ihaskell-magic.cabal b/ihaskell-magic.cabal
--- a/ihaskell-magic.cabal
+++ b/ihaskell-magic.cabal
@@ -10,7 +10,7 @@
 -- PVP summary:      +-+------- breaking API changes
 --                   | | +----- non-breaking API additions
 --                   | | | +--- code changes with no API change
-version:             0.1.0.0
+version:             0.2.0.0
 
 -- A short (one-line) description of the package.
 synopsis:            IHaskell display instances for bytestrings
@@ -61,14 +61,15 @@
               OverloadedStrings
              
   -- Other library packages from which modules are imported.
-  build-depends:       base ==4.6.*,
+  build-depends:       base ==4.6.* || ==4.7.*,
                        classy-prelude >=0.6,
                        magic >= 1.0.8,
                        text,
                        bytestring,
                        utf8-string,
                        base64-bytestring,
-                       ihaskell >= 0.3
+                       ipython-kernel,
+                       ihaskell >= 0.5
   
   -- Directories containing source files.
   -- hs-source-dirs:      
