         @selection = tool
         t.deselect() for t in @tools when t isnt tool
 
+      tool.bind 'deselect', =>
+        @selection = null if @selection is tool
+
       tool.bind 'remove', =>
         @tools.splice i, 1 for t, i in @tools when t is tool
+        @tools[@tools.length - 1]?.select() if @selection is tool
 
       tool.select()
 


  events:
    'mousedown': 'onMouseDown'

  constructor: ->
    super

    @stage = new Kinetic.Stage
      container: @el.get 0

    return if e.isDefaultPrevented()
    return unless @tool?
    e.preventDefault()
    @el.focus()

    {x, y} = @mouseOffset e

