Use int64_t rather than long