Added $ar_keys clearing out to _reset_write().
diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php
index 953cc95..25645a0 100644
--- a/system/database/DB_active_rec.php
+++ b/system/database/DB_active_rec.php
@@ -36,6 +36,7 @@
 	var $ar_like				= array();
 	var $ar_groupby				= array();
 	var $ar_having				= array();
+	var $ar_keys				= array();
 	var $ar_limit				= FALSE;
 	var $ar_offset				= FALSE;
 	var $ar_order				= FALSE;
@@ -2045,7 +2046,7 @@
 	/**
 	 * Resets the active record "write" values.
 	 *
-	 * Called by the insert() update() and delete() functions
+	 * Called by the insert() update() insert_batch() update_batch() and delete() functions
 	 *
 	 * @access	private
 	 * @return	void
@@ -2057,7 +2058,8 @@
 								'ar_from'		=> array(), 
 								'ar_where'		=> array(), 
 								'ar_like'		=> array(),
-								'ar_orderby'	=> array(), 
+								'ar_orderby'	=> array(),
+								'ar_keys'		=> array(), 
 								'ar_limit'		=> FALSE, 
 								'ar_order'		=> FALSE
 								);