Use int64_t instead of long