     $scope.selected = path[1..] if path
 
     this.toggle = (name) ->
-      Tabsets.toggle($scope.id, name, "open")
+      this.select(name)
 
     this.select = (selection) ->
       $scope.$broadcast("selection:changed", selection)

    this

  link: (scope, element, attrs, ctrl) ->
    Tabsets.register(ctrl, scope.id, scope.selected)

Darkswarm.directive "pagesetCtrl", ($location) ->
  restrict: "C"
  scope:
    id: "@"
