 
     @checkTransactionStart()
 
+    before = clone node.metadata
     node.metadata = {} unless node.metadata
 
     for item, val of metadata
       node.metadata[item] = val
 
-    @emit 'changeNode', node
+    @emit 'changeNode', node, before
     @checkTransactionEnd()
 
   # ## Connecting nodes

# On browser we use Component's EventEmitter implementation
else
  EventEmitter = require 'emitter'

# This class represents an abstract NoFlo graph containing nodes
# connected to each other with edges.

    for group in @groups
      continue unless group
      continue unless group.name is groupName
      before = clone group.metadata
      for item, val of metadata
        group.metadata[item] = val
      @emit 'changeGroup', group, before
    @checkTransactionEnd()

  # ## Adding a node to the graph
