Make serialization handle truncated data