diff --git a/src/app/document/controllers/DocumentController.php b/src/app/document/controllers/DocumentController.php
index f809980d7dd31837fbe5f9554f5745d96ad5fe17..100aa796bcff5891f0a5b2faf9fba9c836442d28 100644
--- a/src/app/document/controllers/DocumentController.php
+++ b/src/app/document/controllers/DocumentController.php
@@ -1260,7 +1260,7 @@ class DocumentController
             return $response->withStatus(400)->withJson(['errors' => 'Docserver does not exist']);
         }
 
-        $pathToThumbnail = $docserver['path'] . $adr[0]['path'] ?? null . $adr[0]['filename'] ?? null;
+        $pathToThumbnail = $docserver['path'] . ($adr[0]['path'] ?? null) . ($adr[0]['filename'] ?? null);
         if (!is_file($pathToThumbnail) || !is_readable($pathToThumbnail)) {
             $configPath = CoreConfigModel::getConfigPath();
             exec("php src/app/convert/scripts/ThumbnailScript.php '{$configPath}' {$args['id']} 'document' '{$GLOBALS['id']}' {$args['page']} > /dev/null");
@@ -1620,8 +1620,8 @@ class DocumentController
                         $signPosY   = 0;
                         $signHeight = null;
                     } else {
-                        $signWidth  = ($signature['width'] * $size['width']) / 100;
-                        $signHeight = ($signature['height'] ?? null * $size['height'])/ 100;
+                        $signWidth  = (($signature['width'] ?? null )* $size['width']) / 100;
+                        $signHeight = (($signature['height'] ?? null) * $size['height']) / 100;
                         $signPosX   = ($signature['positionX'] * $size['width']) / 100;
                         $signPosY   = ($signature['positionY'] * $size['height']) / 100;
                     }