add checks when removing an interface, bugfix DetectNetworkCards (definition of variables)