Big fix: use uint64_t instead of int