#603: Improve serialization / deserialization for SB