     else if command is "edges"
         # TOD: merge with those of exported outports
         runtime.edgesForInspection = payload.edges
-        runtime.exportedEdges = [] if not runtime.exportedEdges?
         edges = runtime.edgesForInspection.concat runtime.exportedEdges
         handleNetworkEdges runtime, connection, edges
         sendAck connection, { protocol: 'network', command: command, payload: payload }

        graph.connections = []
        graph.name = payload.name or ''
        graph.nodeMap = {} # nodeName->numericNodeId
        sendAck connection, { protocol: 'graph', command: command, payload: payload }
    else if command is "addnode"
        graph.processes[payload.id] = payload

    runtime.device.sendCommands data, (err) ->
        # Subscribe to change notifications
        # TODO: use a dedicated mechanism for this based on subgraphs
        edges = runtime.exportedEdges.concat runtime.edgesForInspection
        handleNetworkEdges runtime, connection, edges, (err) ->
            runtime.uploadInProgress = false

