Index: /tags/ipp-20100701/ippTasks/dist.pro
===================================================================
--- /tags/ipp-20100701/ippTasks/dist.pro	(revision 28779)
+++ /tags/ipp-20100701/ippTasks/dist.pro	(revision 28780)
@@ -147,6 +147,11 @@
         # to compute an index into the host table
         strlen $stage_id length
-        $start = $length - 2
-        substr $stage_id $start 2 index
+	if ($length >= 2) 
+	    $start = $length - 2
+	    substr $stage_id $start 2 index
+	else
+	    # stage_id < 10 caused a very annoying couple of hours for bills to debug
+	    substr $stage_id 0 1 index
+	end
         $component_id = $index % $count
         book getword ipphosts distribution $component_id -var myhost
@@ -411,6 +416,7 @@
 
     # using $DIST_ID as the "component" works fine here since we only look
-    # at the last two digits
-    set.dist.workdir.by.component $STAGE_ID "exposure" $OUTDIR_TEMPLATE OUTDIR 
+    # at the last two digits. But make sure that there 2 digits
+    $fake_component = $STAGE_ID + 10
+    set.dist.workdir.by.component $fake_component "exposure" $OUTDIR_TEMPLATE OUTDIR 
     if ("$OUTDIR" == "NULL")
         echo ERROR failed to set workdir for $DIST_ID
Index: /tags/ipp-20100701/ippTasks/pstamp.pro
===================================================================
--- /tags/ipp-20100701/ippTasks/pstamp.pro	(revision 28779)
+++ /tags/ipp-20100701/ippTasks/pstamp.pro	(revision 28780)
@@ -188,4 +188,7 @@
         add_poll_args run
         add_poll_labels run
+        # limit number of requests in the queue to avoid blocking everything
+        # when jobs take an infinite amount of time to parse
+        $run = $run -limit 10
         command $run
     end
