--- a/upcmd.sh
+++ b/upcmd.sh
@@ -91,13 +91,13 @@
 # End specific
 
 if test "X$sedcmd" != "X"; then
-   postdata=`sed $sedcmd < $xml`
+    postdata=`sed $sedcmd < $xml`
 else
     postdata=`cat $xml`
 fi
 #echo $postdata
 
-serviceid=`grep xmlns:u $xml | \
+serviceid=`grep xmlns:u= $xml | head -1 | \
                 awk '{print $2}' | \
                 sed -e 's/>//' -e 's/xmlns:u=//' -e 's/"//g'`