diff --git a/src/jamidht/jami_contact.h b/src/jamidht/jami_contact.h
index 9dd07e2c54a6226b7c321799e4d71802d7419aef..73477c220d441cb31592dbb938cbb577092b4694 100644
--- a/src/jamidht/jami_contact.h
+++ b/src/jamidht/jami_contact.h
@@ -54,8 +54,8 @@ struct Contact
     Contact() = default;
     Contact(const Json::Value& json)
     {
-        added = json["added"].asInt();
-        removed = json["removed"].asInt();
+        added = json["added"].asLargestUInt();
+        removed = json["removed"].asLargestUInt();
         confirmed = json["confirmed"].asBool();
         banned = json["banned"].asBool();
     }