fix bug for socket client application