diff --git a/src/Mods/SecExp/js/Unit.js b/src/Mods/SecExp/js/Unit.js
index 35fac5031ab627d3de6aa952931b21781ba3407a..b4df24b3aa03fd3db0fc08b394fe1a52bf674298 100644
--- a/src/Mods/SecExp/js/Unit.js
+++ b/src/Mods/SecExp/js/Unit.js
@@ -36,7 +36,7 @@ App.SecExp.bulkUpgradeUnit = function(unit) {
 		return Math.ceil(cost *= 1.1);
 	}
 
-	const price = unit.map(getCost).reduce((acc, cur) => acc + cur);
+	const price = unit.map(getCost).reduce((acc, cur) => acc + cur, 0);
 	if (price > 0) {
 		el.append(App.UI.DOM.link(`Bulk upgrade for ${cashFormat(price)}`, () => {
 			unit.map(upgradeUnit).reduce((acc, cur) => acc + cur);
diff --git a/src/Mods/SecExp/rebellionOptions.tw b/src/Mods/SecExp/rebellionOptions.tw
index 2beb68f41cfa56f302b4269418567016c0b672ff..8616b3b5c29f3b51ef81349ab1afff450c42be72 100644
--- a/src/Mods/SecExp/rebellionOptions.tw
+++ b/src/Mods/SecExp/rebellionOptions.tw
@@ -216,7 +216,7 @@ In order to preserve the structural integrity of the building and the lives of o
 		<br>Your troops will not limit their arsenal. This will put the structure and your citizens at risk, but our troops will be at full capacity.
 	<</replace>>
 <</link>>
-<<if $SecExp.buildings.riotCenter.advancedRiotEquip == 1>>
+<<if $SecExp.buildings.riotCenter && $SecExp.buildings.riotCenter.advancedRiotEquip == 1>>
 	<br><<link "Advanced riot protocol">>
 		<<set $engageRule = 3>>
 		<<replace "#engage">>
diff --git a/src/Mods/SecExp/secExpSmilingMan.tw b/src/Mods/SecExp/secExpSmilingMan.tw
index 308d1ed55ebd896cc66d6a9bd36df6440fa4f0df..be49839c51dfe122f665e0652fa06f3a3e6a064d 100644
--- a/src/Mods/SecExp/secExpSmilingMan.tw
+++ b/src/Mods/SecExp/secExpSmilingMan.tw
@@ -160,7 +160,7 @@
 		</p>
 	<</if>>
 	<p>
-		<<if $SecExp.buildings.secHub.upgrades.security.cyberBots == 1>>
+		<<if $SecExp.buildings.secHub && $SecExp.buildings.secHub.upgrades.security.cyberBots == 1>>
 			<<set _lostCash -= Math.min(30000, _lostCash)>>
 			The additional cyber defenses acquired and running in the security HQ <<if _lostCash < 200000>>further<</if>> limit the damage.
 		<</if>>
@@ -262,12 +262,14 @@
 				Vast amount of data relative to the ownership of the arcology is lost. You would've run the risk of losing ownership of one of the sectors, but fortunately your authority is so high your citizens do not dare question your claims even in the absence of a valid legal case.
 			<</if>>
 		<</if>>
-		<<if $SecExp.buildings.secHub.coldstorage > 3>>
-			Your cold storage facility has ensured that the Smiling Man's destruction of the primary archives was unable to damage the security of your arcology.
-		<<elseif $SecExp.buildings.secHub.coldstorage == 0>>
-			Your security department sees its archives butchered by the Smiling Man. Almost all data on criminals, citizens, and operations are lost. The <span class="red">security of the arcology is greatly reduced.</span> Criminals, on the other hand, with their past erased, cannot wait to join this new world, so <span class="red">crime will inevitably increase.</span>
-			<<set $SecExp.core.security = Math.clamp($SecExp.core.security * 0.2,0,100)>>
-			<<set $SecExp.core.crimeLow = Math.clamp($SecExp.core.crimeLow * 1.5, 20,100)>>
+		<<if $SecExp.buildings.secHub>>
+			<<if $SecExp.buildings.secHub.coldstorage > 3>>
+				Your cold storage facility has ensured that the Smiling Man's destruction of the primary archives was unable to damage the security of your arcology.
+			<<elseif $SecExp.buildings.secHub.coldstorage == 0>>
+				Your security department sees its archives butchered by the Smiling Man. Almost all data on criminals, citizens, and operations are lost. The <span class="red">security of the arcology is greatly reduced.</span> Criminals, on the other hand, with their past erased, cannot wait to join this new world, so <span class="red">crime will inevitably increase.</span>
+				<<set $SecExp.core.security = Math.clamp($SecExp.core.security * 0.2,0,100)>>
+				<<set $SecExp.core.crimeLow = Math.clamp($SecExp.core.crimeLow * 1.5, 20,100)>>
+			<</if>>
 		<</if>>
 	</p>
 	<p>