diff --git a/SAS/OTDB_Services/TreeService.py b/SAS/OTDB_Services/TreeService.py
index 33cd9ba53ef7b30220171638df8b519d13124094..588e5a672abeffd51ba62fdde177933136ad246f 100755
--- a/SAS/OTDB_Services/TreeService.py
+++ b/SAS/OTDB_Services/TreeService.py
@@ -239,7 +239,7 @@ class PostgressTaskSpecificationRequest(PostgressMessageHandlerInterface):
     def __init__(self, **kwargs):
         super(PostgressTaskSpecificationRequest, self).__init__(**kwargs)
 
-    def handle_message(self, msg):
+    def handle_message(self, **msg):
         " Connect to the right function"
         return TaskSpecificationRequest(msg, self.connection)
 
@@ -251,7 +251,7 @@ class PostgressStatusUpdateCommand(PostgressMessageHandlerInterface):
     def __init__(self, **kwargs):
         super(PostgressStatusUpdateCommand, self).__init__(**kwargs)
 
-    def handle_message(self, msg):
+    def handle_message(self, **msg):
         " Connect to the right function"
         return StatusUpdateCommand(msg, self.connection)
 
@@ -263,7 +263,7 @@ class PostgressKeyUpdateCommand(PostgressMessageHandlerInterface):
     def __init__(self, **kwargs):
         super(PostgressKeyUpdateCommand, self).__init__(**kwargs)
 
-    def handle_message(self, msg):
+    def handle_message(self, **msg):
         " Connect to the right function"
         return KeyUpdateCommand(msg, self.connection)
 
diff --git a/SAS/OTDB_Services/test/t_TreeService.py b/SAS/OTDB_Services/test/t_TreeService.py
index ff208e810339388539f6d57149c83fbd55e330bb..dfd601c58162386eb287ab16f9e90a8975c3e045 100644
--- a/SAS/OTDB_Services/test/t_TreeService.py
+++ b/SAS/OTDB_Services/test/t_TreeService.py
@@ -37,7 +37,7 @@ logger = logging.getLogger(__name__)
 
 def do_rpc(rpc_instance, arg_dict):
 #    try:
-    (data, status) = (rpc_instance)(arg_dict)
+    (data, status) = (rpc_instance)(**arg_dict)
     if status != "OK":
         raise Exception("Status returned is %s" % status)
     for key in sorted(data):
diff --git a/SAS/ResourceAssignment/Services/src/JobsToSchedule.py b/SAS/ResourceAssignment/Services/src/JobsToSchedule.py
index 10afe2d791e34e5e24791032607c7f10a8feff1d..c7185662ecac26f1d2a4d94dbc07b22a233d0b05 100755
--- a/SAS/ResourceAssignment/Services/src/JobsToSchedule.py
+++ b/SAS/ResourceAssignment/Services/src/JobsToSchedule.py
@@ -178,7 +178,7 @@ class JobsToSchedule(OTDBBusListener):
 
     # Request the parset
     main_obsID  = treeId
-    main_parset,_ = self.parset_rpc( { "OtdbID": main_obsID } )
+    main_parset,_ = self.parset_rpc( OtdbID=main_obsID )
 
     # Construct a dict of all the parsets we retrieved
     parsets = {}
@@ -202,7 +202,7 @@ class JobsToSchedule(OTDBBusListener):
         logger.info("Fetching predecessor %s", obsID)
 
         # Request predecessor parset
-        parsets[obsID],_ = self.parset_rpc( { "OtdbID": obsID } )
+        parsets[obsID],_ = self.parset_rpc( OtdbID=obsID )
 
         # Add the list of predecessors
         request_obsIDs = request_obsIDs.union(predecessors(parsets[obsID]))
diff --git a/SAS/ResourceAssignment/Services/test/tJobsToSchedule.py b/SAS/ResourceAssignment/Services/test/tJobsToSchedule.py
index d3d299ba420361e2f135abe66353c1d9e09aaae4..77e43830dd6b75e444b3c9121126c1ea3ebb1886 100644
--- a/SAS/ResourceAssignment/Services/test/tJobsToSchedule.py
+++ b/SAS/ResourceAssignment/Services/test/tJobsToSchedule.py
@@ -80,23 +80,21 @@ class TestService(unittest.TestCase):
     self.requested_parsets = 0
 
     # setup mock parset service
-    def TaskSpecificationService( input_dict ):
-      obsid = input_dict["OtdbID"]
-
-      if obsid == 1:
+    def TaskSpecificationService( OtdbID ):
+      if OtdbID == 1:
         predecessors = "[2,3]"
-      elif obsid == 2:
+      elif OtdbID == 2:
         predecessors = "[3]"
-      elif obsid == 3:
+      elif OtdbID == 3:
         predecessors = "[]"
       else:
-        raise Exception("Invalid obsID")
+        raise Exception("Invalid OtdbID: %s" % OtdbID)
 
       self.requested_parsets += 1
 
       return {
         "Version.number":                                     "1",
-        PARSET_PREFIX + "Observation.ObsID":                  str(obsid),
+        PARSET_PREFIX + "Observation.ObsID":                  str(OtdbID),
         PARSET_PREFIX + "Observation.Scheduler.predecessors": predecessors,
       }