diff --git a/system/libraries/Exceptions.php b/system/libraries/Exceptions.php
index 8f90ff8..8390939 100644
--- a/system/libraries/Exceptions.php
+++ b/system/libraries/Exceptions.php
@@ -30,6 +30,7 @@
 	var $message;
 	var $filename;
 	var $line;
+	var $ob_level;
 
 	var $levels = array(
 						E_ERROR				=>	'Error',
@@ -53,6 +54,7 @@
 	 */	
 	function CI_Exceptions()
 	{
+		$this->ob_level = ob_get_level();
 		// Note:  Do not log messages from this constructor.
 	}
   	
@@ -115,7 +117,7 @@
 	{
 		$message = '<p>'.implode('</p><p>', ( ! is_array($message)) ? array($message) : $message).'</p>';
 
-		if (ob_get_level() > 1)
+		if (ob_get_level() > $this->ob_level + 1)
 		{
 			ob_end_flush();	
 		}
@@ -151,7 +153,7 @@
 			$filepath = $x[count($x)-2].'/'.end($x);
 		}
 		
-		if (ob_get_level() > 1)
+		if (ob_get_level() > $this->ob_level + 1)
 		{
 			ob_end_flush();	
 		}
diff --git a/system/libraries/Input.php b/system/libraries/Input.php
index b630bf6..8017620 100644
--- a/system/libraries/Input.php
+++ b/system/libraries/Input.php
@@ -73,13 +73,15 @@
 		{
 			if ( ! is_array($global))
 			{
-				unset($$global);
+				global $global;
+				$$global = NULL;
 			}
 			else
 			{
 				foreach ($global as $key => $val)
 				{
-					unset($$key);
+					global $$key;
+					$$key = NULL;
 				}	
 			}
 		}
diff --git a/system/libraries/User_agent.php b/system/libraries/User_agent.php
index 8d16067..95eccd1 100644
--- a/system/libraries/User_agent.php
+++ b/system/libraries/User_agent.php
@@ -186,6 +186,7 @@
 					$this->is_browser = TRUE;
 					$this->version = $match[1];
 					$this->browser = $val;
+					$this->_set_mobile();
 					return TRUE;
 				}
 			}