diff --git a/system/drivers/DB_active_record.php b/system/drivers/DB_active_record.php
index f1995c8..1320af9 100644
--- a/system/drivers/DB_active_record.php
+++ b/system/drivers/DB_active_record.php
@@ -790,7 +790,7 @@
 			}		
 		}
 		
-		if (ctype_digit($this->ar_limit))
+		if (is_numeric($this->ar_limit))
 		{
 			$sql .= "\n";
 			$sql = $this->_limit($sql, $this->ar_limit, $this->ar_offset);
diff --git a/system/drivers/DB_driver.php b/system/drivers/DB_driver.php
index 0c2084a..5fcb04a 100644
--- a/system/drivers/DB_driver.php
+++ b/system/drivers/DB_driver.php
@@ -352,7 +352,7 @@
 	 */	
 	function escape($str)
 	{	
-		if ( ! ctype_digit($str)) // bug fix to ensure that numbers are not treated as strings.
+		if ( ! is_numeric($str)) // bug fix to ensure that numbers are not treated as strings.
 		{
 			switch (gettype($str))
 			{