Make checkUnitsState more robust. remove counts