diff --git a/apps/i2psnark/java/src/org/klomp/snark/PeerCoordinator.java b/apps/i2psnark/java/src/org/klomp/snark/PeerCoordinator.java
index 6e7956078d439b34933b55745c287ea2b90dff6f..0fa74e95424e55c907553181caa5ac6064615b18 100644
--- a/apps/i2psnark/java/src/org/klomp/snark/PeerCoordinator.java
+++ b/apps/i2psnark/java/src/org/klomp/snark/PeerCoordinator.java
@@ -105,11 +105,15 @@ public class PeerCoordinator implements PeerListener
   public void setWantedPieces()
   {
     // Make a list of pieces
+    // FIXME synchronize, clear and re-add instead?
+    // Don't replace something we are synchronizing on.
     wantedPieces = new ArrayList();
     BitField bitfield = storage.getBitField();
     int[] pri = storage.getPiecePriorities();
     for(int i = 0; i < metainfo.getPieces(); i++) {
-      if (!bitfield.get(i)) {
+      // only add if we don't have and the priority is >= 0
+      if ((!bitfield.get(i)) &&
+          (pri == null || pri[i] >= 0)) {
         Piece p = new Piece(i);
         if (pri != null)
             p.setPriority(pri[i]);
diff --git a/apps/i2psnark/java/src/org/klomp/snark/PeerState.java b/apps/i2psnark/java/src/org/klomp/snark/PeerState.java
index cfa1575af43cdd457658612a094b5a10c80be894..cadcbf8668117cd3293ec90d81fd573e3a0dcd3e 100644
--- a/apps/i2psnark/java/src/org/klomp/snark/PeerState.java
+++ b/apps/i2psnark/java/src/org/klomp/snark/PeerState.java
@@ -56,6 +56,7 @@ class PeerState
 
   // Outstanding request
   private final List<Request> outstandingRequests = new ArrayList();
+  /** the tail (NOT the head) of the request queue */
   private Request lastRequest = null;
 
   private final static int MAX_PIPELINE = 5;               // this is for outbound requests
@@ -565,11 +566,10 @@ class PeerState
               }
         }
         int nextPiece = listener.wantPiece(peer, bitfield);
-        if (_log.shouldLog(Log.DEBUG))
-          _log.debug(peer + " want piece " + nextPiece);
-            if (nextPiece != -1
-                && (lastRequest == null || lastRequest.piece != nextPiece))
-              {
+        if (nextPiece != -1
+            && (lastRequest == null || lastRequest.piece != nextPiece)) {
+                if (_log.shouldLog(Log.DEBUG))
+                    _log.debug(peer + " want piece " + nextPiece);
                 // Fail safe to make sure we are interested
                 // When we transition into the end game we may not be interested...
                 if (!interesting) {
@@ -596,9 +596,16 @@ class PeerState
                   out.sendRequest(req);
                 lastRequest = req;
                 return true;
-              }
+          } else {
+                if (_log.shouldLog(Log.DEBUG))
+                    _log.debug(peer + " no more pieces to request");
+          }
       }
 
+    // failsafe
+    if (outstandingRequests.isEmpty())
+        lastRequest = null;
+
     // If we are not in the end game, we may run out of things to request
     // because we are asking other peers. Set not-interesting now rather than
     // wait for those other requests to be satisfied via havePiece()