STREAM-99: fixed bug with serialization of very large numbers