diff --git a/libs/shared/lib/querybuilder/panel/querysidepanel/querySettingsDialog.tsx b/libs/shared/lib/querybuilder/panel/querysidepanel/querySettingsDialog.tsx
index e9d3177d78e82e80fa035b8453274736cdbf7081..6b7c032cdcf700b6755e3ee55a650dc767437b88 100644
--- a/libs/shared/lib/querybuilder/panel/querysidepanel/querySettingsDialog.tsx
+++ b/libs/shared/lib/querybuilder/panel/querysidepanel/querySettingsDialog.tsx
@@ -23,7 +23,7 @@ export const QuerySettingsDialog = React.forwardRef<HTMLDivElement, QuerySetting
       dispatch(addWarning('The minimum depth cannot be smaller than 0'));
     } else if (state.depth.max > 99) {
       dispatch(addWarning('The maximum depth cannot be larger than 99'));
-    } else if (state.depth.min >= state.depth.max) {
+    } else if (state.depth.min > state.depth.max) {
       dispatch(addWarning('The minimum depth cannot be larger than the maximum depth'));
     } else {
       dispatch(setQuerybuilderSettings(state));
@@ -67,7 +67,7 @@ export const QuerySettingsDialog = React.forwardRef<HTMLDivElement, QuerySetting
                     className="input input-sm input-bordered w-full"
                     placeholder="0"
                     min={0}
-                    max={state.depth.max - 1}
+                    max={state.depth.max}
                     value={state.depth.min}
                     onChange={(e) => setState({ ...state, depth: { min: parseInt(e.target.value), max: state.depth.max } })}
                     onKeyDown={(e) => {
@@ -85,7 +85,7 @@ export const QuerySettingsDialog = React.forwardRef<HTMLDivElement, QuerySetting
                     type="number"
                     className="input input-sm input-bordered w-full"
                     placeholder="0"
-                    min={state.depth.min + 1}
+                    min={state.depth.min}
                     max={99}
                     value={state.depth.max}
                     onChange={(e) => setState({ ...state, depth: { max: parseInt(e.target.value), min: state.depth.min } })}