Fixed issue where switch was flipped before UPNP registration response