fix for 32-bit where large value are converted to float (cherry picked from commit 0d0909e4e6)
0d0909e4e6