Fix bug with role negotiation in the network code

There seems to have been a bug with an undefined variable in the (rarely used) role negotiation option.

This should hopefully fix #55.