diff --git a/lib/FSi/DoctrineExtensions/Uploadable/UploadableListener.php b/lib/FSi/DoctrineExtensions/Uploadable/UploadableListener.php
index <HASH>..<HASH> 100644
--- a/lib/FSi/DoctrineExtensions/Uploadable/UploadableListener.php
+++ b/lib/FSi/DoctrineExtensions/Uploadable/UploadableListener.php
@@ -563,7 +563,7 @@ class UploadableListener extends MappedEventSubscriber
     {
         while ($filesystem->has($newKey = $keymaker->createKey($object, $property, $id, $fileName, $keyPattern))) {
             if ($match = preg_match('/(.*)_(\d+)(\.[^\.]*)?$/', $fileName, $matches)) {
-                $fileName = sprintf('%s_%s%s', $matches[1], strval($matches[2] + 1), $matches[3]);
+                $fileName = sprintf('%s_%s%s', $matches[1], strval($matches[2] + 1), isset($matches[3])?$matches[3]:'');
             } else {
                 $fileParts = explode('.', $fileName);
                 if (count($fileParts) > 1) {
Fix file key generation in Uploadable extension