diff --git a/txupnp/scpd.py b/txupnp/scpd.py
index de59353..14c6f9f 100644
--- a/txupnp/scpd.py
+++ b/txupnp/scpd.py
@@ -36,7 +36,7 @@ def xml_arg(name, arg):
def get_soap_body(service_name, method, param_names, **kwargs):
args = "".join(xml_arg(n, kwargs.get(n)) for n in param_names)
- return '\n%s\n%s' % (XML_VERSION, method, service_name, args, method)
+ return '\n%s\n%s' % (XML_VERSION, method, service_name, args, method)
class _SCPDCommand(object):
@@ -193,7 +193,7 @@ class SCPDCommandRunner(object):
name, inputs, outputs = self._soap_function_info(action_info)
command = _SCPDCommand(self._http_client, self._gateway.base_address, self._gateway.port,
self._gateway.base_address + self._gateway.get_service(service_type).controlURL.encode(),
- self._gateway.get_service(service_type).serviceId.encode(), name, inputs, outputs)
+ self._gateway.get_service(service_type).serviceType.encode(), name, inputs, outputs)
current = getattr(self, command.method)
if hasattr(current, "_return_types"):
command._process_result = _return_types(*current._return_types)(command._process_result)