upgrade some int to int64_t to avoid overflows in reporting