         @dropdown_menu.options[@dropdown_menu.selected].action(this, t)
       @dropdown_menu = null
 
-      if @reconstruct_as?
+      if @delete_flag
+        return null
+      else if @reconstruct_as?
         newcollection = new @reconstruct_as(this.shape)
         newcollection.copyNodesFrom(this)
         delete @reconstruct_as

      c.addAnimations(c.sortNodes( ((n1, n2) -> n2.value - n1.value), t))
  },
  {
    name: 'tidy',
    action: (c, t) ->
      console.log('tidy trees')

canvas.addEventListener 'mouseup', (e) ->
  t = Date.now()/1000
  pos = getCursorPosition(canvas, e)
  collections = (c.mouseup(pos, t) for c in collections)
  collections = (c for c in collections when c isnt null)
