fix socket error