need int64 cast to prevent overflow on the 32-bit architecture

Signed-off-by: Chanwit Kaewkasi <chanwit@gmail.com>