diff --git a/modules/html_generator.py b/modules/html_generator.py
index 17272f96..170eaddc 100644
--- a/modules/html_generator.py
+++ b/modules/html_generator.py
@@ -142,7 +142,7 @@ def _render_web_search_body(body):
for r in results:
title = html.escape(r['title'])
url = r['url']
- snippet = html.escape(r.get('snippet', ''))
+ snippet = html.escape(r.get('snippet') or '')
if url.lower().startswith(('http://', 'https://')):
link = f'{title}'
else:
diff --git a/modules/utils.py b/modules/utils.py
index 9efb253d..696ff1b9 100644
--- a/modules/utils.py
+++ b/modules/utils.py
@@ -211,7 +211,8 @@ def is_mmproj_file(name):
def find_sibling_mmproj(model_path):
"""Return an mmproj path relative to model_dir when exactly one mmproj file
- sits next to the model in a subfolder of model_dir (any depth, not root).
+ sits in the same folder as the model, provided that folder is a subfolder
+ of model_dir (not model_dir itself).
"""
try:
model_path = Path(model_path)