diff --git a/system/scaffolding/Scaffolding.php b/system/scaffolding/Scaffolding.php
index 4b6ebee..9059ec1 100644
--- a/system/scaffolding/Scaffolding.php
+++ b/system/scaffolding/Scaffolding.php
@@ -34,9 +34,12 @@
 	function Scaffolding($db_table)
 	{
 		$obj =& get_instance();
-		foreach ($obj->ci_is_loaded as $val)
+		foreach (get_object_vars($obj) as $key => $var)
 		{
-			$this->$val =& $obj->$val;
+			if (is_object($var))
+			{
+				$this->$key =& $obj->$key;
+			}
 		}
 				
 		/**