                    (.maintain! this max-keys)
                    true)
                  (loop [node (aget children (+ ix 1))]
-                   (if (.-children node)
+                   (if (not (nil? (.-children node)))
                      (recur (aget (.-children node) 0))
                      (do
                        (aset keys ix (aget (.-keys node) 0))

             (debug :search max-key current seek-key)
             (aset seek-key new-var max-key)
             (.seek iterator seek-key)
             (if (.end? iterator)
               (do
                 (.undo iterator)
                 (recur new-var (- new-var 1) 0))

         (dotimes [i (alength iterators)]
           (let [iterator (aget iterators i)]
             (.reset iterator)
             (when (true? (.end? iterator))
               (set! end? true))))
         (dotimes [i (alength seek-key)]
           (aset seek-key i least))
