diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php
index eb9f14a..1fa4f95 100644
--- a/system/database/DB_active_rec.php
+++ b/system/database/DB_active_rec.php
@@ -125,7 +125,7 @@
 		{
 			$type = strtoupper(trim($type));
 
-			if ( ! in_array($type, array('LEFT', 'RIGHT', 'OUTER', 'INNER', 'LEFT OUTER', 'RIGHT OUTER')))
+			if ( ! in_array($type, array('LEFT', 'RIGHT', 'OUTER', 'INNER', 'LEFT OUTER', 'RIGHT OUTER'), TRUE))
 			{
 				$type = '';
 			}
@@ -390,7 +390,7 @@
 	{
 		if (trim($direction) != '')
 		{
-			$direction = (in_array(strtoupper(trim($direction)), array('ASC', 'DESC', 'RAND()'))) ? ' '.$direction : ' ASC';
+			$direction = (in_array(strtoupper(trim($direction)), array('ASC', 'DESC', 'RAND()'), TRUE)) ? ' '.$direction : ' ASC';
 		}
 		
 		$this->ar_orderby[] = $orderby.$direction;
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index d25135e..94db84b 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -726,8 +726,8 @@
 		}
 		else
 		{
-			$args = (func_num_args() > 1) ? array_shift(func_get_args()) : null;
-			
+			$args = (func_num_args() > 1) ? array_splice(func_get_args(), 1) : null;
+
 			return call_user_func_array($function, $args); 
 		}
 	}