   for image_id in data.current_images
     $('.selectable#'+image_id).addClass('selected')
 
-  Session.set "trigger_update",Date.now() # force update (how else to do this?)
+  trigger_update.changed() # force update
 
 Template.LinkExistingImageDialog.helpers
   friendly_item_name: ->

      return

  get_n_selected: ->
    dt = Session.get "trigger_update"

    template = Template.instance()
    if !template.firstNode?
      # The DOM hasn't been rendered yet, can't count selected.

trigger_update = new Deps.Dependency

my_uploader = null # variable local to this script
uploader_state_changed = new Deps.Dependency
