diff --git a/contrib/bin/fusiondirectory-setup b/contrib/bin/fusiondirectory-setup
index 61b5db31917f587c6347d8af495b61e595513b75..662950be828e12a23b5e15c99b73b6bcf5c1a69c 100644
--- a/contrib/bin/fusiondirectory-setup
+++ b/contrib/bin/fusiondirectory-setup
@@ -337,9 +337,9 @@ sub get_classes {
             chomp $line;
 
             # process for lines beginning with "class", and extracting the 2nd word (the class name)
-            if ( $line =~ /^class\s*(\w+).*/ ) {
+            if ( $line =~ /^(abstract )?class\s*(\w+).*/ ) {
               # adding the values (class name and file path) to the hash
-              $classes_hash_result{$1} = $file;
+              $classes_hash_result{$2} = $file;
             }
 
             # process for lines beginning with "interface", and extracting the 2nd word (the interface name)