Handle int64 and double types correctly