                 puts("Error: " + e);
                 return;
             }
+            proxy_pairs.push(proxy_pair);
             proxy_pair.addEventListener(Event.COMPLETE, function(e:Event):void {
                 proxy_pair.log("Complete.");
                 num_proxy_pairs--;
+                /* Delete from the list of active proxy pairs. */
+                proxy_pairs.splice(proxy_pairs.indexOf(proxy_pair), 1);
                 badge.proxy_end();
             });
             proxy_pair.connect();

        /* Number of proxy pairs currently connected (up to
           MAX_NUM_PROXY_PAIRS). */
        private var num_proxy_pairs:int = 0;

        private var fac_addr:Object;
        

            stage.align = StageAlign.TOP_LEFT;

            badge = new Badge();

            proxy_pairs = [];

            if (RATE_LIMIT)
                rate_limit = new BucketRateLimit(RATE_LIMIT * RATE_LIMIT_HISTORY, RATE_LIMIT_HISTORY);
