diff --git a/libc3/facts.c b/libc3/facts.c
index ec64e5b..bab141d 100644
--- a/libc3/facts.c
+++ b/libc3/facts.c
@@ -49,7 +49,7 @@ s_fact * facts_add_fact (s_facts *facts, const s_fact *fact)
return &item->data;
}
tmp.id = facts->next_id;
- if (facts->next_id == UW_MAX) {
+ if (facts->next_id == U64_MAX) {
errx(1, "facts serial id exhausted");
return NULL;
}
diff --git a/libc3/types.h b/libc3/types.h
index 2fadc4b..2e0900a 100644
--- a/libc3/types.h
+++ b/libc3/types.h
@@ -467,7 +467,7 @@ struct facts {
pthread_rwlock_t rwlock;
sw rwlock_count;
pthread_t rwlock_thread;
- uw next_id;
+ u64 next_id;
};
struct facts_cursor {