diff --git a/info.textgrid.middleware.tgauth.rbac/tgExtensions/Project.class.php b/info.textgrid.middleware.tgauth.rbac/tgExtensions/Project.class.php
index 56844448e061514dd0def6f521ae53a79344ddcb..cc8e31aa2a111659b503a514c99679f522f9933f 100755
--- a/info.textgrid.middleware.tgauth.rbac/tgExtensions/Project.class.php
+++ b/info.textgrid.middleware.tgauth.rbac/tgExtensions/Project.class.php
@@ -66,7 +66,7 @@ class Project extends RBACExtension {
     // If the roleName contains a DN that is directly under
     // the project-base-DN, then add the project-specific
     // permissions and operations
-    if( preg_match( "/^rbacName=TGPR[0-9]+\s*,\s*" . $this->conf->getValue( "project", "base" ) . "/i", $roleDn ) ) {
+    if( preg_match( "/^rbacName=TGPR-[^,]+\s*,\s*" . $this->conf->getValue( "project", "base" ) . "/i", $roleDn ) ) {
 
       $arrEntry = $inContext->getValue( "entry" );
 
@@ -98,17 +98,7 @@ class Project extends RBACExtension {
     $projectEntry = $inContext->getValue( "entry" );  // The entry itself
 
 
-    $file = fopen( "LOG/createMissingProjectRoleTree.debug", "a+" );
-    fwrite( $file, "\n/^\s*rbacName=TGPR[0-9]+\s*,\s*" . $this->conf->getValue( "project", "base" ) . "/i" . " ::: " . $projectDn . "\n" );
-    fclose( $file );
-
-
-    if( preg_match( "/^\s*rbacName=TGPR[0-9]+\s*,\s*" . $this->conf->getValue( "project", "base" ) . "/i", $projectDn ) ) {
-
-      $file = fopen( "LOG/createMissingProjectRoleTree.debug", "a+" );
-      fwrite( $file, "It is indeed a project!\n" );
-      fclose( $file );
-
+    if( preg_match( "/^\s*rbacName=TGPR-[^,]+\s*,\s*" . $this->conf->getValue( "project", "base" ) . "/i", $projectDn ) ) {
 
       // Create the other roles
       $this->rbac->addAscendant( $this->conf->getValue( "project", "observerRoleName" ), $projectDn );