fix service gateway inability to handle dicts

need to merge pyon pull request that I initiated before this one