diff --git a/typo3/sysext/install/Classes/Configuration/Image/GraphicsMagickPreset.php b/typo3/sysext/install/Classes/Configuration/Image/GraphicsMagickPreset.php
index f7b5cb16686b1702a6c32cc78b01c8e46b211789..fa3f7fa5c6df570db37fa8bbb8a364efdc97d474 100644
--- a/typo3/sysext/install/Classes/Configuration/Image/GraphicsMagickPreset.php
+++ b/typo3/sysext/install/Classes/Configuration/Image/GraphicsMagickPreset.php
@@ -75,7 +75,7 @@ class GraphicsMagickPreset extends AbstractImagePreset
 
             $binaryPath = $path . $executable;
             if (!file_exists($binaryPath) || !is_executable($binaryPath)) {
-                break;
+                continue;
             }
 
             $command = escapeshellarg($binaryPath) . ' -version';
diff --git a/typo3/sysext/install/Classes/Configuration/Image/ImageMagick6Preset.php b/typo3/sysext/install/Classes/Configuration/Image/ImageMagick6Preset.php
index 0569c05accb3dab89dd85b50c77f4371c6197b30..9ea9b4111b7725b4dad70a78788d3452f50e2706 100644
--- a/typo3/sysext/install/Classes/Configuration/Image/ImageMagick6Preset.php
+++ b/typo3/sysext/install/Classes/Configuration/Image/ImageMagick6Preset.php
@@ -79,7 +79,7 @@ class ImageMagick6Preset extends AbstractImagePreset
 
             $binaryPath = $path . $executable;
             if (!file_exists($binaryPath) || !is_executable($binaryPath)) {
-                break;
+                continue;
             }
 
             $command = escapeshellarg($binaryPath) . ' -version';