fix issue 1706
diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php
index 09c4de5..0232adf 100644
--- a/system/helpers/download_helper.php
+++ b/system/helpers/download_helper.php
@@ -95,7 +95,10 @@
 		}
 
 		// Clean output buffer
-		ob_clean();
+		if (ob_get_level() !== 0)
+		{
+			ob_clean();
+		}
 
 		// Generate the server headers
 		header('Content-Type: '.$mime);