     catch err
       mask = 0
     return if mask is 255 then true else mask
-  
+
   # Prevent annotations over SVG elements
   stopPropagation: (e) ->
     e.stopPropagation()
-  
+
   # Add to favorites and increment counter
   onFavorite: (e) ->
     e.preventDefault()

    Subject.off 'fetch', @appendSubjects
    Subject.off 'select', @onSubjectSelect
    Subject.off 'no-more', @onNoMoreSubjects
    
    # Clean up for when user signs out while using QD
    if @viewer?
      @viewer.trigger 'close'
      @viewer.clearCache()
    
    # Unbind Talk event and clean collection ids
    @unbind 'addToTalk'
    @talkIds = {}
    
    # Set default counts
    @counter.updateAttributes({'classified': 0, 'potentials': 0, 'favorites': 0})
    
    if user?
      
      # Set up three collections (My Dashboard, My Candidates and My Simulations)
      names = ['My Dashboard', 'My Candidates', 'My Simulations']
      descriptions = [

        'Simulated gravitational lenses.'
      ]
      @setTalkCollections(user, names, descriptions)

      @bind 'addToTalk', (collectionId, subjectId) =>
        @addToTalkCollection(user, collectionId, subjectId)

      project = user.project

      # Determine if tutorial completed
      unless 'tutorial_done' of project
        @startTutorial()
