diff --git a/cycle_breaker.cc b/cycle_breaker.cc
index f9e3de6..552a54f 100644
--- a/cycle_breaker.cc
+++ b/cycle_breaker.cc
@@ -3,8 +3,10 @@
 // found in the LICENSE file.
 
 #include "update_engine/cycle_breaker.h"
+#include <inttypes.h>
 #include <set>
 #include <utility>
+#include "base/string_util.h"
 #include "update_engine/graph_utils.h"
 #include "update_engine/tarjan.h"
 #include "update_engine/utils.h"
@@ -65,20 +67,21 @@
     blocked_.resize(subgraph_.size());
     blocked_graph_.clear();
     blocked_graph_.resize(subgraph_.size());
-    Circuit(current_vertex_);
+    Circuit(current_vertex_, 0);
   }
   
   out_cut_edges->swap(cut_edges_);
   DCHECK(stack_.empty());
 }
 
+static const size_t kMaxEdgesToConsider = 2;
+
 void CycleBreaker::HandleCircuit() {
   stack_.push_back(current_vertex_);
   CHECK_GE(stack_.size(), 2);
   Edge min_edge = make_pair(stack_[0], stack_[1]);
   uint64_t min_edge_weight = kuint64max;
-  const int kMaxEdgesToConsider = 4;
-  int edges_considered = 0;
+  size_t edges_considered = 0;
   for (vector<Vertex::Index>::const_iterator it = stack_.begin();
        it != (stack_.end() - 1); ++it) {
     Edge edge = make_pair(*it, *(it + 1));
@@ -122,11 +125,25 @@
   return false;
 }
 
-bool CycleBreaker::Circuit(Vertex::Index vertex) {
+bool CycleBreaker::Circuit(Vertex::Index vertex, Vertex::Index depth) {
   // "vertex" was "v" in the original paper.
   bool found = false;  // Was "f" in the original paper.
   stack_.push_back(vertex);
   blocked_[vertex] = true;
+  {
+    static int counter = 0;
+    counter++;
+    if (counter == 10000) {
+      counter = 0;
+      std::string stack_str;
+      for (vector<Vertex::Index>::const_iterator it = stack_.begin();
+           it != stack_.end(); ++it) {
+        stack_str += StringPrintf("%lu -> ",
+                                  static_cast<long unsigned int>(*it));
+      }
+      LOG(INFO) << "stack: " << stack_str;
+    }
+  }
 
   for (Vertex::SubgraphEdgeMap::iterator w =
            subgraph_[vertex].subgraph_edges.begin();
@@ -138,9 +155,9 @@
       HandleCircuit();
       found = true;
     } else if (!blocked_[*w]) {
-      if (Circuit(*w)) {
+      if (Circuit(*w, depth + 1)) {
         found = true;
-        if (StackContainsCutEdge())
+        if ((depth > kMaxEdgesToConsider) || StackContainsCutEdge())
           break;
       }
     }
diff --git a/cycle_breaker.h b/cycle_breaker.h
index 359f55b..9c10c17 100644
--- a/cycle_breaker.h
+++ b/cycle_breaker.h
@@ -34,7 +34,7 @@
  private:
   void HandleCircuit();
   void Unblock(Vertex::Index u);
-  bool Circuit(Vertex::Index vertex);
+  bool Circuit(Vertex::Index vertex, Vertex::Index depth);
   bool StackContainsCutEdge() const;
 
   std::vector<bool> blocked_;  // "blocked" in the paper
diff --git a/generate_delta_main.cc b/generate_delta_main.cc
index 7e18252..08ee8df 100644
--- a/generate_delta_main.cc
+++ b/generate_delta_main.cc
@@ -65,6 +65,7 @@
     }
     DeltaPerformer performer;
     CHECK_EQ(performer.Open(FLAGS_old_image.c_str(), 0, 0), 0);
+    CHECK(performer.OpenKernel(FLAGS_old_kernel.c_str()));
     vector<char> buf(1024 * 1024);
     int fd = open(FLAGS_apply_delta.c_str(), O_RDONLY, 0);
     CHECK_GE(fd, 0);
