Integer deserialization properly casts to integers.

[ fix #2739 ]