tweak to message serialization