diff --git a/Data/ASN1/Types/String.hs b/Data/ASN1/Types/String.hs
--- a/Data/ASN1/Types/String.hs
+++ b/Data/ASN1/Types/String.hs
@@ -148,18 +148,23 @@
                   b1 = fromIntegral (v .&. 0xff)
 
 decodeUTF32 :: ByteString -> String
-decodeUTF32 b
-    | (B.length b `mod` 4) /= 0 = error "not a valid UTF32 string"
-    | otherwise                 = fromUTF32 $ B.unpack b
-  where fromUTF32 (a:b:c:d:l) =
-            let v :: Word32
-                v = (fromIntegral a `shiftL` 24) .|.
-                    (fromIntegral b `shiftL` 16) .|.
-                    (fromIntegral c `shiftL` 8) .|.
-                    (fromIntegral d)
-             in toEnum (fromIntegral v) : fromUTF32 l
-        fromUTF32 [] = []
-        fromUTF32 _  = error "decodeUTF32: internal error"
+decodeUTF32 bs
+    | (B.length bs `mod` 4) /= 0 = error "not a valid UTF32 string"
+    | otherwise                  = fromUTF32 0
+  where w32ToChar :: Word32 -> Char
+        w32ToChar = toEnum . fromIntegral
+        fromUTF32 ofs
+            | ofs == B.length bs = []
+            | otherwise =
+                let a = B.index bs ofs
+                    b = B.index bs (ofs+1)
+                    c = B.index bs (ofs+2)
+                    d = B.index bs (ofs+3)
+                    v = (fromIntegral a `shiftL` 24) .|.
+                        (fromIntegral b `shiftL` 16) .|.
+                        (fromIntegral c `shiftL` 8) .|.
+                        (fromIntegral d)
+                 in w32ToChar v : fromUTF32 (ofs+4)
 encodeUTF32 :: String -> ByteString
 encodeUTF32 s = B.pack $ concatMap (toUTF32 . fromEnum) s
   where toUTF32 v = [b0,b1,b2,b3]
diff --git a/asn1-types.cabal b/asn1-types.cabal
--- a/asn1-types.cabal
+++ b/asn1-types.cabal
@@ -1,5 +1,5 @@
 Name:                asn1-types
-Version:             0.3.2
+Version:             0.3.3
 Description:         ASN.1 standard types
 License:             BSD3
 License-file:        LICENSE
@@ -11,7 +11,7 @@
 Category:            Data
 stability:           experimental
 Cabal-Version:       >=1.6
-Homepage:            http://github.com/vincenthz/hs-asn1-types
+Homepage:            http://github.com/vincenthz/hs-asn1
 
 Library
   Build-Depends:     base >= 3 && < 5
@@ -29,4 +29,4 @@
 
 source-repository head
   type:     git
-  location: git://github.com/vincenthz/hs-asn1-types
+  location: git://github.com/vincenthz/hs-asn1
