                     i++;
                 } else {
                     buildingBox.visible = false;
-                }
-            }
-        }
-
-        private function drawUnitCounts():void {
-            var topBuildingBox:DrawHUDUnit = buildingBoxes[buildingBoxes.length-1];
-            for (var j:int = buildingBoxes.length - 1; j >= 0; j--) {
-                topBuildingBox = buildingBoxes[j];
-                if (topBuildingBox.visible) {
-                    break;
-                }
-            }
-
-            var top:Number = topBuildingBox.height + topBuildingBox.y + 10;
-            unitLabel.y = top + 10;
-            top = unitLabel.height + unitLabel.y + 5;
-            var i:uint = 0;
-            for each (var unitBox:DrawHUDUnit in unitBoxes) {
-                unitBox.x = (width - unitBox.width * 3) / 2 + (i % 3) * unitBox.width;
-                unitBox.y = ((unitBox.height + 10) * Math.floor(i / 3)) + top;
-                if (unitBox.getCount() > 0) {
-                    unitBox.visible = true;
-                    i++;
-                } else {
-                    unitBox.visible = false;
                 }
             }
         }

            repositionWinMarkers();
            resizeHQBox();
            drawTowerBoxes();
            drawBuildingCounts();
            drawUnitCounts();
        }

    }

            maxTowers = Math.max(maxTowers, towerCount);
            drawTowerBoxes();

            for each (var unitBox:DrawHUDUnit in unitBoxes) {
                unitBox.setCount(controller.currentState.getUnitCount(unitBox.getType(), team));
            }

            for each (var buildingBox:DrawHUDUnit in buildingBoxes) {
                buildingBox.setCount(controller.currentState.getUnitCount(buildingBox.getType(), team));
            }

            drawUnitCounts();
            drawBuildingCounts();

            if (controller.currentRound == controller.match.getRounds()) {
                drawWinMarkers();
