         guard parts.count == 2 else {
             throw PeerIdentifierError.WrongDataFormat
         }
-        guard let generation = Int(parts[1]) else {
+        guard let generation = Int(parts[1], radix: 16) else {
             throw PeerIdentifierError.WrongDataFormat
         }
         self.uuid = parts[0]


    public init() {
        uuid = NSUUID().UUIDString
        generation = 1
    }

    private init(uuidIdentifier: String, generation: Int) {

    }

    public var stringValue: String {
        return "\(uuid):\(String(generation, radix: 16))"
    }
}

