         set_view: (view) =>
             @view = view
             @container.state.view = view
-            @$(".link_to_#{@view}_view").addClass 'active'
             @$(".link_to_#{@view}_view").parent().addClass 'active'
+            @$(".link_to_#{@view}_view").parent().siblings().removeClass 'active'
             if @query_result?.ready
                 @new_view()
 

                    trigger: 'hover'
                    placement: 'bottom'
                @$('.tab-content').html @view_object?.$el
            return @

        new_view: () =>

# "Session is already running a query" 400 error when aborting a changefeed
# views should not completely redraw every added row
# close connection: no element found: probably due to firefox trying to parse the xhr response as xml
# call to query_result.size and other code assumes that result is an array
# table view shows no results when it means "no more results" or "no results yet"
# abort button blinks when runnign a normal query
