Fixing the check for a connected device