     ScholarMapViz.$similarity_types.fadeIn 500
 
   generate_links = (nodes) ->
+    active_types = active_similarity_types()
     links = _.map nodes, (node, index) ->
       _.slice(nodes, index+1, nodes.length).map (other_node) ->
         similarities = {}
         any_links = false
-        for similarity_type in active_similarity_types()
+        for similarity_type in active_types
           similarities[similarity_type] = if node[similarity_type] and other_node[similarity_type]
             if node[similarity_type] and typeof(node[similarity_type][0]) == 'object'
               node_attr_ids       = _.map       node[similarity_type], (similarity) -> similarity.id

          {
            source: nodes.indexOf node
            target: nodes.indexOf other_node
            similarities: _.filter _.map( active_similarity_types(), (similarity_type) ->
              {
                type: similarity_type
                list: similarities[similarity_type]

        .style 'stroke', group_fill
        .style 'stroke-width', 50
        .on 'click', (d) ->
          unless d3.event.metaKey || d3.event.ctrlKey
            graph.nodes.forEach (n) ->
              n.selected = n in d.values
            d3.selectAll('.node').attr 'class', (n) -> if n.selected then 'node selected' else 'node'
            refresh_selected_nodes()

    # constantly redraws the graph, with the following items
    force.on 'tick', ->
