Revert the changed made to GetBytesFromStream and SyncMsgFactory.