      unsigned scoreLimit = maxK + extraSearchDepth;
  
      //
-@@ -350,6 +352,7 @@ IntersectingPairedEndAligner::align(
+@@ -350,6 +353,11 @@ IntersectingPairedEndAligner::align(
                  } else {
                      offset = readLen[whichRead] - seedLen - nextSeedToTest;
                  }
-+				minHashTableHits[whichRead][dir] = min(minHashTableHits[whichRead][dir], nHits[dir]);
++				if(nHits[dir] > 0) {
++					minHashTableHits[whichRead][dir] = min(minHashTableHits[whichRead][dir], nHits[dir]);
++				} else {
++					misses[whichRead][dir]++;
++				}
                  if (nHits[dir] < maxBigHits) {
                      totalHashTableHits[whichRead][dir] += nHits[dir];
                      if (doesGenomeIndexHave64BitLocations) {
-@@ -756,6 +759,7 @@ IntersectingPairedEndAligner::align(
+@@ -756,6 +764,7 @@ IntersectingPairedEndAligner::align(
                                      (*nSecondaryResults)++;
  
                                  }

         *spaceUsed = bamSize;
diff -rupN -x Xcode -x .git tmp/snap/SNAPLib/BaseAligner.cpp snap/SNAPLib/BaseAligner.cpp
--- tmp/snap/SNAPLib/BaseAligner.cpp	2016-01-18 14:51:10.000000000 -0500
+++ snap/SNAPLib/BaseAligner.cpp	2016-08-22 21:19:18.000000000 -0400
@@ -289,7 +289,7 @@ Return Value:
     primaryResult->score = UnusedScoreValue;
     primaryResult->status = NotFound;

         bool alignedAsPair = false) const = 0; 
diff -rupN -x Xcode -x .git tmp/snap/SNAPLib/IntersectingPairedEndAligner.cpp snap/SNAPLib/IntersectingPairedEndAligner.cpp
--- tmp/snap/SNAPLib/IntersectingPairedEndAligner.cpp	2016-01-18 14:55:36.000000000 -0500
+++ snap/SNAPLib/IntersectingPairedEndAligner.cpp	2016-08-23 10:51:43.000000000 -0400
@@ -231,6 +231,8 @@ IntersectingPairedEndAligner::align(
         for (Direction dir = FORWARD; dir < NUM_DIRECTIONS; dir++) {
             totalHashTableHits[whichRead][dir] = 0;
             largestHashTableHit[whichRead][dir] = 0;
+			minHashTableHits[whichRead][dir] = maxBigHits;
+			misses[whichRead][dir] = 0;
             hashTableHitSets[whichRead][dir]->init();
         }
 
@@ -277,6 +279,7 @@ IntersectingPairedEndAligner::align(
     localBestPairProbability[1] = 0;
     double probabilityOfAllPairs = 0;
     unsigned bestPairScore = 65536;
