Fix to new_socket()