Index: /trunk/Nebulous-Server/bin/neb-admin
===================================================================
--- /trunk/Nebulous-Server/bin/neb-admin	(revision 29668)
+++ /trunk/Nebulous-Server/bin/neb-admin	(revision 29669)
@@ -71,5 +71,14 @@
 # check to make sure that only one instance of neb-admin is running
 # XXX this implies we should move pending replicate elsewhere
-my $pidfile = '/var/tmp/neb-admin';
+my $pidfile;
+if (defined $pending) {
+    $pidfile = '/var/tmp/neb-admin.replicate';
+}
+elsif (defined $balance) {
+    $pidfile = '/var/tmp/neb-admin.balance';
+}
+else {
+    $pidfile = '/var/tmp/neb-admin';
+}
 # abort if an instance is already running
 END { unlink_pid_file($pidfile) };
@@ -391,7 +400,7 @@
 	my $destination_host   = $obj->{destination_host};
 	
-	unless ($here == $there) { next; }
-	unless ($ins_id == $max_ins_id) { next; }
-	unless ($source_cab_id != $destination_cab_id) { next; }
+	unless ($here == $there) { $Npending-- ; next; }
+	unless ($ins_id == $max_ins_id) { $Npending-- ; next; }
+	unless ($source_cab_id != $destination_cab_id) { $Npending-- ;  next; }
 	
         my %md = (
