fix upnp bugs