diff --git a/Graphics/Thumbnail.hs b/Graphics/Thumbnail.hs
--- a/Graphics/Thumbnail.hs
+++ b/Graphics/Thumbnail.hs
@@ -20,10 +20,13 @@
 mkThumbnail :: L.ByteString -> IO (Either String Thumbnail)
 mkThumbnail = thumbnail . L.unpack
   where
-    thumbnail ws@(0xff:0xd8:_) = thumbnailJpeg ws
-    thumbnail ws@(0x89:0x50:_) = thumbnailPng ws
-    thumbnail ws@(0x47:0x49:0x46:_) = thumbnailGif ws
-    thumbnail _ = return $ Left "unsupported image format"
+    thumbnail ws | length ws >= 3 = thumbnail' ws -- FIXME!
+                 | otherwise = return $ Left "unsupported image format"
+    
+    thumbnail' ws@(0xff:0xd8:_) = thumbnailJpeg ws
+    thumbnail' ws@(0x89:0x50:_) = thumbnailPng ws
+    thumbnail' ws@(0x47:0x49:0x46:_) = thumbnailGif ws
+    thumbnail' _ = return $ Left "unsupported image format"
     
     thumbnailJpeg ws = do
       src <- loadJpegByteString $ BS.pack ws
diff --git a/thumbnail.cabal b/thumbnail.cabal
--- a/thumbnail.cabal
+++ b/thumbnail.cabal
@@ -1,5 +1,5 @@
 Name:                thumbnail
-Version:             0.3
+Version:             0.3.0.1
 Synopsis:            generate thumbnail image
 Description:         generate thumbnail image
 Homepage:            https://github.com/cutsea110/thumbnail
