diff --git a/src/Text/XML/Pipe.hs b/src/Text/XML/Pipe.hs
--- a/src/Text/XML/Pipe.hs
+++ b/src/Text/XML/Pipe.hs
@@ -26,6 +26,7 @@
 toEvent (XmlDecl v : ns) = XEXmlDecl v : toEvent ns
 toEvent (XmlStart ((q, _), n) nss atts : ns) =
 	XESTag (q, n) nss (map (first $ first fst) atts) : toEvent ns
+toEvent (XmlEnd ((q, _), n) : ns) = XEETag (q, n) : toEvent ns
 toEvent (XmlNode ((q, _), n) nss atts ns : ns') =
 	XESTag (q, n) nss (map (first $ first fst) atts) :
 		toEvent ns ++ [XEETag (q, n)] ++ toEvent ns'
diff --git a/src/Text/XML/XmlCreate.hs b/src/Text/XML/XmlCreate.hs
--- a/src/Text/XML/XmlCreate.hs
+++ b/src/Text/XML/XmlCreate.hs
@@ -17,7 +17,7 @@
 data XmlNode
 	= XmlDecl (Int, Int)
 	| XmlStart QName [Xmlns] [(QName, BS.ByteString)]
---	| XmlEnd QName
+	| XmlEnd QName
 	| XmlNode QName [Xmlns] [(QName, BS.ByteString)] [XmlNode]
 	| XmlCharData BS.ByteString
 	deriving (Eq, Show)
diff --git a/xml-pipe.cabal b/xml-pipe.cabal
--- a/xml-pipe.cabal
+++ b/xml-pipe.cabal
@@ -2,7 +2,7 @@
 cabal-version:	>= 1.8
 
 name:		xml-pipe
-version:	0.0.0.4
+version:	0.0.0.5
 stability:	Experimental
 author:		Yoshikuni Jujo <PAF01143@nifty.ne.jp>
 maintainer:	Yoshikuni Jujo <PAF01143@nifty.ne.jp>
@@ -110,7 +110,7 @@
 source-repository	this
     type:	git
     location:	git://github.com/YoshikuniJujo/xml-pipe.git
-    tag:	xml-pipe-0.0.0.4
+    tag:	xml-pipe-0.0.0.5
 
 library
     hs-source-dirs:	src
