fixed message serialization bug