Fix some issues for when upnp is not available.