diff --git a/index.html b/index.html
index 63e887d..dd0abe0 100644
--- a/index.html
+++ b/index.html
@@ -502,8 +502,14 @@ function updateUI() {
}
function updateStats() {
- var numActive = frozen.filter(x => !x).length;
- var numFrozen = frozen.filter(x => x).length;
+ var numActive = 0;
+ var numFrozen = 0;
+ for (var i = 0; i < CREW; i++) {
+ if (health[i] > 0 && frozen[i])
+ numFrozen += 1;
+ if (health[i] > 0 && !frozen[i])
+ numActive += 1;
+ }
$("#stat-crew-cryo").text(numFrozen);
$("#stat-crew-active").text(numActive);