diff --git a/biohazard.cabal b/biohazard.cabal
--- a/biohazard.cabal
+++ b/biohazard.cabal
@@ -1,5 +1,5 @@
 Name:                biohazard
-Version:             0.6.2
+Version:             0.6.3
 Synopsis:            bioinformatics support library
 Description:         This is a collection of modules I separated from
                      various bioinformatics tools.  The hope is to make
@@ -37,7 +37,7 @@
 source-repository this
   type:     git
   location: git://github.com/udo-stenzel/biohazard.git
-  tag:      0.6.2
+  tag:      0.6.3
 
 
 Library
diff --git a/src/Bio/Bam/Rec.hs b/src/Bio/Bam/Rec.hs
--- a/src/Bio/Bam/Rec.hs
+++ b/src/Bio/Bam/Rec.hs
@@ -361,8 +361,9 @@
 isAuxillary      = flip testBit  8 . b_flag
 isFailsQC        = flip testBit  9 . b_flag
 isDuplicate      = flip testBit 10 . b_flag
-isTrimmed        = flip testBit 16 . b_flag
-isMerged         = flip testBit 17 . b_flag
+
+isTrimmed        = flip testBit 0 . extAsInt 0 "FF"
+isMerged         = flip testBit 1 . extAsInt 0 "FF"
 
 type_mask :: Int
 type_mask = flagFirstMate .|. flagSecondMate .|. flagPaired
