diff --git a/info.textgrid.middleware.tgauth.webauth/WebAuthN/PutAttributes.php b/info.textgrid.middleware.tgauth.webauth/WebAuthN/PutAttributes.php
index 302acb378f4704218582e28eaca384e2533fe8b9..ff9ce972eb7cbe022e4de00421336eebb46a9577 100755
--- a/info.textgrid.middleware.tgauth.webauth/WebAuthN/PutAttributes.php
+++ b/info.textgrid.middleware.tgauth.webauth/WebAuthN/PutAttributes.php
@@ -43,15 +43,14 @@ $attributes = $rbac->getUserAttributes( $Sid );
 $newattributes = array("gnuelpfix"); 
 $thedisplayname = "anonymous";
 
-//phpinfo(); 
 foreach ($attributes as $a) {
   if ($util->isBoolean($a)) {
-    if (isset ( $_REQUEST[$a->name] ) && $_REQUEST[$a->name] === "on" && $a->value !== "TRUE") {
+    if (isset ( $_REQUEST[$a->name] ) && $_REQUEST[$a->name] === "on") {
       $na = new StdClass();
       $na->name = $a->name;
       $na->value = "TRUE";
       $newattributes[] = $na;
-    } else if ($a->value === "TRUE" && !isset ( $_REQUEST[$a->name])) {
+    } else {
       $na = new StdClass();
       $na->name = $a->name;
       $na->value = "FALSE";
@@ -71,10 +70,10 @@ foreach ($attributes as $a) {
     $thedisplayname = $a->value;
   }
 }
+#$file = fopen ("/tmp/xxxPut.log", "w+");
+#fwrite ($file, "putting these attrs: ". serialize ($newattributes) ."\n");
+#fclose ($file); 
 
-$file = fopen ("/tmp/xxxPut.log", "w+");
-fwrite ($file, "putting these attrs: ". serialize ($newattributes) ."\n");
-fclose ($file); 
 
 // write in RBAC
 $res = $rbac->setAttributes($newattributes, $Sid, $loginmode );
diff --git a/info.textgrid.middleware.tgauth.webauth/tglib/RBAC.class.php b/info.textgrid.middleware.tgauth.webauth/tglib/RBAC.class.php
index fd0c1d855a6ffb16c3069e1c0e43e4a9eb8f0b89..cf0156753275da4f9f90253692a8f196f7fe547f 100644
--- a/info.textgrid.middleware.tgauth.webauth/tglib/RBAC.class.php
+++ b/info.textgrid.middleware.tgauth.webauth/tglib/RBAC.class.php
@@ -238,7 +238,9 @@ class RBAC {
 		   "detail" => "SOAP FAULT (authorizedRoles)!: " . $f->faultcode . " / " . $f->faultstring . " / " . $f->detail );
       exit;
     }
-    if (is_Array($roleResponse->role)) {
+    if (!isset($roleResponse->role)) {
+      $creReq->roleset = Array();
+    } elseif (is_Array($roleResponse->role)) {
       $creReq->roleset = $roleResponse->role;
     } elseif (is_string($roleResponse->role)) {
       $creReq->roleset = Array($roleResponse->role);