[lib/connection]Fix broken serialization-code.