         value: [String: V],
         valueEncoding: ProtoIntEncoding = .variable
     ) throws {
-        try encode(tag: tag, value: value) { key, value in
+        try encode(tag: tag, value: value) { key, item in
             try encode(tag: 1, value: key)
-            try encode(tag: 2, value: value, encoding: valueEncoding)
+            try encode(tag: 2, value: item, encoding: valueEncoding)
         }
     }
 

    // MARK: - Public Methods - Encoding - Maps

    public func encode<V: ProtoEncodable>(tag: UInt32, value: [String: V]) throws {
        try encode(tag: tag, value: value) { key, value in
            try encode(tag: 1, value: key)
            try encode(tag: 2, value: value)
        }
    }

    public func encode<V: RawRepresentable>(tag: UInt32, value: [String: V]) throws where V.RawValue == UInt32 {
        try encode(tag: tag, value: value) { key, value in
            try encode(tag: 1, value: key)
            try encode(tag: 2, value: value.rawValue, encoding: .variable)
        }
    }


    public func encode(tag: UInt32, value: [Bool]?, packed: Bool = false) throws {
        guard let value = value else { return }

        try encode(tag: tag, wireType: .varint, value: value, packed: packed) { item in
            try item.encode(to: self)
        }
    }

