fixing tcp client/server issue