 		let tail = dropFirst(components)
 		setValue(value, forKeyPathComponents: tail, dictionary: &child!)
 
-		return dictionary[head] = child
+		return dictionary[String(head)] = child
 	}
 }
 

import class Foundation.NSNumber

private func setValue(value: AnyObject, forKey key: String, inout dictionary: [String : AnyObject]) {
	return setValue(value, forKeyPathComponents: ArraySlice(key.componentsSeparatedByString(".")), dictionary: &dictionary)
}

private func setValue(value: AnyObject, forKeyPathComponents components: ArraySlice<String>, inout dictionary: [String : AnyObject]) {
	if components.isEmpty {
		return
	}

	let head = components.first!

	if components.count == 1 {
		return dictionary[String(head)] = value
	} else {
		var child = dictionary[String(head)] as? [String : AnyObject]
		if child == nil {
			child = [:]
		}
