correct some errors on calling TCP server