fixed bug in replication caused by mux-demux serialization to text-stream