Fixed crash in protocols sending 64-bit ints.

Fixes #855.