fix communication with C++ server