Some fixes
diff --git a/system/database/DB.php b/system/database/DB.php
index 313728f..13a447d 100644
--- a/system/database/DB.php
+++ b/system/database/DB.php
@@ -158,12 +158,12 @@
 	// Check for a subdriver
 	if ( ! empty($DB->subdriver))
 	{
-		$driver_file = BASEPATH.'database/drivers/'.$param['dbdriver'].'/subdrivers/'.$params['dbdriver'].'_'.$params['subdriver'].'_driver.php';
+		$driver_file = BASEPATH.'database/drivers/'.$DB->dbdriver.'/subdrivers/'.$DB->dbdriver.'_'.$DB->subdriver.'_driver.php';
 
 		if (file_exists($driver_file))
 		{
 			require_once($driver_file);
-			$driver = 'CI_DB_'.$params['dbdriver'].'_'.$params['subdriver'].'_driver';
+			$driver = 'CI_DB_'.$DB->dbdriver.'_'.$DB->subdriver.'_driver';
 			$DB = new $driver($params);
 		}
 	}