diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@
 Usage
 -----
 
-Cgrep 6.4.11 Usage: cgrep [OPTION] [PATTERN] files...
+Cgrep 6.4.12 Usage: cgrep [OPTION] [PATTERN] files...
 
 cgrep [OPTIONS] [ITEM]
 
diff --git a/cgrep.cabal b/cgrep.cabal
--- a/cgrep.cabal
+++ b/cgrep.cabal
@@ -1,6 +1,6 @@
 Name:                cgrep
 Description:         Cgrep: a context-aware grep for source codes
-Version:             6.4.11
+Version:             6.4.12
 Synopsis:            Command line tool
 Homepage:            http://awgn.github.io/cgrep/
 License:             GPL-2
diff --git a/src/CGrep/Filter.hs b/src/CGrep/Filter.hs
--- a/src/CGrep/Filter.hs
+++ b/src/CGrep/Filter.hs
@@ -130,19 +130,16 @@
     | CodeState   <- cxtState s = let cindex = findBoundary (x,xs) (commBound c)
                                       lindex = findBoundary (x,xs) (litrBound c)
                                   in if bloom c ! x
-                                     then
-
-                                         if cindex >= 0
-                                         then s{ cxtState = CommState cindex, display = codefilt, skip = C.length ( _beg (commBound c !! cindex) ) - 1 }
-                                         else if lindex >= 0
-                                         then s{ cxtState = LitrState lindex, display = codefilt, skip = C.length ( _beg (litrBound c !! lindex) ) - 1 }
-                                         else s{ display  = codefilt, skip = 0 }
-
+                                     then if cindex >= 0
+                                          then s{ cxtState = CommState cindex, display = commfilt, skip = C.length ( _beg (commBound c !! cindex) ) - 1 }
+                                          else if lindex >= 0
+                                               then s{ cxtState = LitrState lindex, display = codefilt, skip = C.length ( _beg (litrBound c !! lindex) ) - 1 }
+                                               else s{ display  = codefilt, skip = 0 }
                                      else s{ display  = codefilt, skip = 0 }
 
     | CommState n <- cxtState s = let Boundary _ e = commBound c !! n
                                   in if C.head e == x && C.tail e `C.isPrefixOf` xs
-                                     then s{ cxtState = CodeState, display = codefilt, skip = C.length e - 1}
+                                     then s{ cxtState = CodeState, display = commfilt, skip = C.length e - 1}
                                      else s{ display  = commfilt, skip = 0 }
 
     | LitrState n <- cxtState s = let Boundary _ e = litrBound c !! n
diff --git a/src/Config.hs b/src/Config.hs
--- a/src/Config.hs
+++ b/src/Config.hs
@@ -31,7 +31,7 @@
 cgreprc = "cgreprc"
 
 version :: String
-version = "6.4.11"
+version = "6.4.12"
 
 
 data Config = Config
