Upnp fixes

hi just a couple of bug fixes