Fix number conversion on 32-bit systems