socket initialization fix