resolving bug of undefined list and to not show unactivated units