diff --git a/markdown2svg.cabal b/markdown2svg.cabal
--- a/markdown2svg.cabal
+++ b/markdown2svg.cabal
@@ -2,7 +2,7 @@
 cabal-version:	>=1.8
 
 name:		markdown2svg
-version:	0.0.1.13
+version:	0.0.1.14
 stability:	Experimental
 author:		Yoshikuni Jujo <PAF01143@nifty.ne.jp>
 maintainer:	Yoshikuni Jujo <PAF01143@nifty.ne.jp>
@@ -31,7 +31,7 @@
 source-repository	this
   type:		git
   location:	git://github.com/YoshikuniJujo/markdown2svg.git
-  tag:		0.0.1.13
+  tag:		0.0.1.14
 
 executable markdown2svg
   hs-source-dirs:	src
diff --git a/src/SVG.hs b/src/SVG.hs
--- a/src/SVG.hs
+++ b/src/SVG.hs
@@ -198,7 +198,9 @@
 	| otherwise = Header n s : addChapters newCs ts
 	where
 	chaps = concatMap (++ ".") $ map show $ catMaybes $ take n newCs
-	newCs = take (n - 1) cs ++ [(+ 1) <$> cs !! (n - 1)] ++ drop n cs
+	newCs = take (n - 1) cs ++ [(+ 1) <$> cs !! (n - 1)] ++ map reset (drop n cs)
+	reset (Just _) = Just 0
+	reset _ = Nothing
 addChapters cs (t : ts) = t : addChapters cs ts
 
 preprocess :: [Text] -> [Text]
