     <fieldset>
     """) # i18n
 
-    createFieldSet = ($ctrl) ->
-        ctx = {roleList: $ctrl.scope.project.roles}
-        return template(ctx)
-
     link = ($scope, $el, $attrs) ->
-        $ctrl = $el.controller()
-
-        title = $el.find("h2")
-        fieldSet = createFieldSet($ctrl)
-        title.after(fieldSet)
+        createFieldSet = ->
+            ctx = {roleList: $scope.roles}
+            return template(ctx)
 
         $scope.$on "membersform:new",  ->
+            title = $el.find("h2")
+            fieldSet = createFieldSet()
+            title.after(fieldSet)
+
             $el.removeClass("hidden")
 
         $scope.$on "$destroy", ->

            if not form.validate()
                return

            form = angular.element($el.find("form"))
            fieldSets = form.children("fieldset")

            invitations = _.map fieldSets, (fs) ->
                fieldset = angular.element(fs)

            fieldSet = target.parent()

            target.removeClass("icon-plus").addClass("icon-delete")
            newFieldSet = createFieldSet()
            fieldSet.after(newFieldSet)

        $el.on "click", ".button-green", (event) ->
