fix a bug for cast from int to int64_t