fix deserialization of multiple segment messages