fix writing client-server integration