Optimize UPnP command