Fix some problems found when hooking up to PeerConnection (only append a '/' if there are channels; return the right variable when converting a parameter)