diff --git a/dan/ocr/predict/inference.py b/dan/ocr/predict/inference.py
index e33d0ba22b267f56f16f573bb18761d8e23e43b7..0d67983a1465bb6acd08ccd2d8b53e97f160a54d 100644
--- a/dan/ocr/predict/inference.py
+++ b/dan/ocr/predict/inference.py
@@ -413,7 +413,7 @@ def process_batch(
                 )
                 result["attention_gif"] = gif_filename
 
-        json_filename = Path(output, image_path.stem).with_suffix(".json")
+        json_filename = Path(output, f"{image_path.stem}.json")
         logger.info(f"Saving JSON prediction in {json_filename}")
         json_filename.write_text(json.dumps(result, indent=2))