diff --git a/a3_vemf_reloaded/fn/fn_hc.sqf b/a3_vemf_reloaded/fn/fn_hc.sqf
index 8cf1b85..16f9458 100644
--- a/a3_vemf_reloaded/fn/fn_hc.sqf
+++ b/a3_vemf_reloaded/fn/fn_hc.sqf
@@ -11,28 +11,31 @@
     OBJECT - the headless client
 */
 
-private [("_r"),("_n"),("_arr"),("_gl")];
+private [("_r"),("_n"),("_arr"),("_gl"),("_hc")];
 _n = "headLessClientNames" call VEMFr_fnc_config;
 _arr = [];
 _gl = uiNamespace getVariable "VEMFrHcLoad";
 {
-   if (((side _x) isEqualTo sideLogic) AND ((name _x) in _n)) then
+   _hc = missionNameSpace getVariable [(_x),"nope"];
+   if not(_hc isEqualTo "nope") then
       {
-         _arr pushBackUnique _x;
-         if not(_x in (_gl select 0)) then
+         if (((typeName _hc) isEqualTo "OBJECT") AND (toLower(typeOf _hc) isEqualTo toLower("HeadlessClient_F"))) then
             {
-               _i = (_gl select 0) pushBack _x;
-               (_gl select 1) set [_i, 0];
+               _arr pushBackUnique _hc;
+               if not(_x in (_gl select 0)) then
+                  {
+                     _i = (_gl select 0) pushBack _hc;
+                     (_gl select 1) set [_i, 0];
+                  };
             };
       };
-} forEach playableUnits;
+} forEach _n;
 
-_l = 99999;
-{
-   if (_x <= _l) then { _l = _x };
-} forEach (_gl select 1);
-
-_r = (_gl select 0) select ((_gl select 1) find _l);
-(_gl select 1) set [(_gl select 0) find _r, _l + 1];
-
-_r
+if ((count _arr) > 0) then
+   {
+      _l = 99999;
+      { if (_x <= _l) then { _l = _x } } forEach (_gl select 1);
+      _r = (_gl select 0) select ((_gl select 1) find _l);
+      (_gl select 1) set [(_gl select 0) find _r, _l + 1];
+      if not(isNil"_r") then { _r };
+   };