   # Removing a connection will emit the `removeEdge` event.
   removeEdge: (node, port, node2, port2) ->
     @checkTransactionStart()
-
+    port = port.toLowerCase()
+    port2 = port2.toLowerCase()
     toRemove = []
     toKeep = []
     if node2 and port2

  addEdgeIndex: (outNode, outPort, outIndex, inNode, inPort, inIndex, metadata = {}) ->
    return unless @getNode outNode
    return unless @getNode inNode
    inIndex = undefined if inIndex is null
    outIndex = undefined if outIndex is null
    metadata = {} unless metadata

    @checkTransactionEnd()

  renameOutport: (oldPort, newPort) ->
    oldPort = oldPort.toLowerCase()
    newPort = newPort.toLowerCase()
    return unless @outports[oldPort]

    @checkTransactionStart()
