diff --git a/samtools.cabal b/samtools.cabal
--- a/samtools.cabal
+++ b/samtools.cabal
@@ -1,5 +1,5 @@
 Name:                samtools
-Version:             0.1.2
+Version:             0.1.3
 Synopsis:            Binding to the C samtools library
 Description:         Binding to the C samtools library, which reads and
                      writes SAM format alignments, both binary and tab-
diff --git a/src/Bio/SamTools/Bam.hs b/src/Bio/SamTools/Bam.hs
--- a/src/Bio/SamTools/Bam.hs
+++ b/src/Bio/SamTools/Bam.hs
@@ -163,7 +163,7 @@
   let seqarr = bam1Seq p
       getQSeq l | l < 1 = return Nothing
                 | otherwise = return $! Just $! 
-                              BS.pack [ seqiToChar . bam1Seqi seqarr $ i | i <- [0..((fromIntegral l)-1)] ]
+	          fst (BS.unfoldrN (fromIntegral l) (\i -> if i==l then Nothing else Just (seqiToChar $ bam1Seqi seqarr $ i,i+1)) 0)
   in getLQSeq p >>= getQSeq
      
 -- | 'Just' the query qualities, or 'Nothing' when it is
