diff --git a/system/database/DB.php b/system/database/DB.php
index a148c9f..d2afce9 100644
--- a/system/database/DB.php
+++ b/system/database/DB.php
@@ -22,7 +22,7 @@
  * @author		Rick Ellis
  * @link		http://www.codeigniter.com/user_guide/database/
  */
-function DB($params = '', $active_record = FALSE)
+function &DB($params = '', $active_record = FALSE)
 {
 	// Load the DB config file if a DSN string wasn't passed
 	if (is_string($params) AND strpos($params, '://') === FALSE)
@@ -78,7 +78,7 @@
 
 	// Instantiate the DB adapter
 	$driver = 'CI_DB_'.$params['dbdriver'].'_driver';
-	$DB = new $driver($params);	
+	$DB =& new $driver($params);	
 	return $DB;
 }	
 
diff --git a/system/database/drivers/mssql/mssql_utility.php b/system/database/drivers/mssql/mssql_utility.php
index 129ba68..24ff1e1 100644
--- a/system/database/drivers/mssql/mssql_utility.php
+++ b/system/database/drivers/mssql/mssql_utility.php
@@ -106,7 +106,7 @@
 	 */
 	function _repair_table($table)
 	{
-		return return FALSE; // Is this supported in MS SQL?
+		return FALSE; // Is this supported in MS SQL?
 	}
 
 	// --------------------------------------------------------------------
diff --git a/system/database/drivers/oci8/oci8_utility.php b/system/database/drivers/oci8/oci8_utility.php
index 96be095..f4e9121 100644
--- a/system/database/drivers/oci8/oci8_utility.php
+++ b/system/database/drivers/oci8/oci8_utility.php
@@ -106,7 +106,7 @@
 	 */
 	function _repair_table($table)
 	{
-		return return FALSE; // Is this supported in Oracle?
+		return FALSE; // Is this supported in Oracle?
 	}
 
 	// --------------------------------------------------------------------
diff --git a/system/database/drivers/sqlite/sqlite_utility.php b/system/database/drivers/sqlite/sqlite_utility.php
index 9cb2cf0..ecce5be 100644
--- a/system/database/drivers/sqlite/sqlite_utility.php
+++ b/system/database/drivers/sqlite/sqlite_utility.php
@@ -131,7 +131,7 @@
 	 */
 	function _repair_table($table)
 	{
-		return return FALSE;
+		return FALSE;
 	}
 
 	// --------------------------------------------------------------------
diff --git a/system/libraries/Loader.php b/system/libraries/Loader.php
index 7bf1160..b402464 100644
--- a/system/libraries/Loader.php
+++ b/system/libraries/Loader.php
@@ -703,9 +703,8 @@
 	function _ci_init_class($class, $prefix = '', $config = NULL)
 	{	
 		// Is there an associated config file for this class?
-		if ($config !== NULL)
-		{
-			$config = NULL;
+		if ($config === NULL)
+		{ 
 			if (file_exists(APPPATH.'config/'.$class.EXT))
 			{
 				include_once(APPPATH.'config/'.$class.EXT);
diff --git a/system/libraries/Router.php b/system/libraries/Router.php
index bbfa0d1..0603720 100644
--- a/system/libraries/Router.php
+++ b/system/libraries/Router.php
@@ -373,7 +373,7 @@
 		
 		$request_uri = preg_replace("|/(.*)|", "\\1", str_replace("\\", "/", $_SERVER['REQUEST_URI']));
 
-		if ($request_uri == '' OR $request_uri == SELF)
+		if ($request_uri == '' OR $request_uri == $this->config->item('index_page'))
 		{
 			return '';
 		}