Fix socket issue