Fixed socket initialization