 			
 			continue if not match
 			
-			index = parseInt(match[1])
+			index = parseInt(match[1]) + 1
 			path = match[2]
-			ref = adaptors["vboxnet#{index}"] ?= {}
+			oref = ref = adaptors["Adaptor #{index}"] ?= {}
 			
 			for key in path.split('/')
 				path = key
+				oref = ref
 				ref = ref[path] ?= {}
 				
-			ref[path] = val.value
+			oref[path] = val.value
 			
 		callback null, adaptors if callback
 

	*
	* @param {string} vm
	* @param {number} nic
	* @param {string} network
	* @param {function(?err)} callback
###
exports.set_hostonly = (vm, nic, network, callback) ->
	command.exec 'modifyvm', vm, "--nic#{nic}", 'hostonly', "--hostonlyadapter#{nic}", network, (err, code, output) ->
		return callback err if err
		return callback new Error "cannot set hostonly network for nic #{nic} on #{vm}" if code > 0
		return do callback if callback

	*
	* @param {string} vm
	* @param {number} nic
	* @param {string} netname
	* @param {function(?err)} callback
###
exports.set_internal = (vm, nic, netname, callback) ->
	command.exec 'modifyvm', vm, "--nic#{nic}", 'intnet', "--intnet#{nic}", netname, (err, code, output) ->
		return callback err if err
		return callback new Error "cannot set internal network for nic #{nic} on #{vm}" if code > 0
		return do callback if callback
