Fix socket connections