diff --git a/src/resources/js/directives.js b/src/resources/js/directives.js
index <HASH>..<HASH> 100644
--- a/src/resources/js/directives.js
+++ b/src/resources/js/directives.js
@@ -398,6 +398,10 @@
                 }
                 
                 $scope.toggleSelection = function (value) {
+                	if ($scope.model == undefined) {
+                		$scope.model = [];
+                	}
+                	
                     for (var i in $scope.model) {
                         if ($scope.model[i]["value"] == value.value) {
                             $scope.model.splice(i, 1);
@@ -882,6 +886,9 @@
                 };
                 
                 $scope.add = function() {
+                	if ($scope.model == undefined) {
+                		$scope.model = [];
+                	}
                     $scope.model.push({ value : '' });
                     $scope.setFocus();
                 };
fixed bugs in re validation of angular directives on click.