fix socket issue