Changes for socket creation