diff --git a/docroot/includes/file.inc b/docroot/includes/file.inc
index c5e5cf0..82a84b9 100644
--- a/docroot/includes/file.inc
+++ b/docroot/includes/file.inc
@@ -649,6 +649,10 @@ function file_usage_list(stdClass $file) {
  * @see file_usage_delete()
  */
 function file_usage_add(stdClass $file, $module, $type, $id, $count = 1) {
+  if (is_null($file->fid)) {
+    var_dump(debug_backtrace()); exit;
+    var_dump($file, $module, $type, $id, $count); exit;
+  }
   db_merge('file_usage')
     ->key(array(
       'fid' => $file->fid,
diff --git a/docroot/modules/field/field.attach.inc b/docroot/modules/field/field.attach.inc
index 36117eb..692ff11 100644
--- a/docroot/modules/field/field.attach.inc
+++ b/docroot/modules/field/field.attach.inc
@@ -363,7 +363,7 @@ function _field_invoke_multiple($op, $entity_type, $entities, &$a = NULL, &$b =
     foreach ($grouped_entities[$field_id] as $langcode => $entities) {
       foreach ($entities as $id => $entity) {
         if ($grouped_items[$field_id][$langcode][$id] !== array() || isset($entity->{$field_name}[$langcode])) {
-          $entity->{$field_name}[$langcode] = $grouped_items[$field_id][$langcode][$id];
+          $entity->{$field_name}[$langcode] = $grouped_items[$field_id][$langcode][$id]; // WTF?!: $entity->field_wex_file['und'] = array (0 => NULL) /Users/kenorb/Sites/AAT/docroot/modules/field/field.attach.inc:366
         }
       }
     }
diff --git a/docroot/sites/all/modules/contrib/ctools/includes/object-cache.inc b/docroot/sites/all/modules/contrib/ctools/includes/object-cache.inc
index 5de4df7..7ceffeb 100644
--- a/docroot/sites/all/modules/contrib/ctools/includes/object-cache.inc
+++ b/docroot/sites/all/modules/contrib/ctools/includes/object-cache.inc
@@ -41,7 +41,7 @@ function ctools_object_cache_get($obj, $name, $skip_cache = FALSE) {
       $cache[$key] = unserialize($data->data);
     }
   }
-  return isset($cache[$key]) ? $cache[$key] : NULL;
+  return isset($cache[$key]) ? clone $cache[$key] : NULL;
 }
 
 /**
diff --git a/docroot/sites/all/modules/contrib/field_validation/date_validation/date_validation.module b/docroot/sites/all/modules/contrib/field_validation/date_validation/date_validation.module
index 8e88513..627e121 100644
--- a/docroot/sites/all/modules/contrib/field_validation/date_validation/date_validation.module
+++ b/docroot/sites/all/modules/contrib/field_validation/date_validation/date_validation.module
@@ -12,4 +12,4 @@ function date_validation_ctools_plugin_directory($module, $plugin) {
   if ($module == 'field_validation' && $plugin == 'validator') {
     return 'plugins/' . $plugin;
   }
-}
\ No newline at end of file
+}
diff --git a/docroot/sites/all/modules/contrib/field_validation/plugins/validator/field_validation_match_field_validator.inc b/docroot/sites/all/modules/contrib/field_validation/plugins/validator/field_validation_match_field_validator.inc
index 162f469..feb6551 100644
--- a/docroot/sites/all/modules/contrib/field_validation/plugins/validator/field_validation_match_field_validator.inc
+++ b/docroot/sites/all/modules/contrib/field_validation/plugins/validator/field_validation_match_field_validator.inc
@@ -83,4 +83,4 @@ class field_validation_match_field_validator extends field_validation_validator
     parent::settings_form($form, $form_state);
   }
 
-}
\ No newline at end of file
+}
diff --git a/docroot/sites/all/modules/custom/aat_wex/aat_wex.forms.inc b/docroot/sites/all/modules/custom/aat_wex/aat_wex.forms.inc
index 9fbba6a..bcecb5e 100644
--- a/docroot/sites/all/modules/custom/aat_wex/aat_wex.forms.inc
+++ b/docroot/sites/all/modules/custom/aat_wex/aat_wex.forms.inc
@@ -209,7 +209,15 @@ function aat_wex_wizard_next(&$form_state) {
   $object = $form_state['object'];
   $values = $form_state['values'];
   $node = ctools_object_cache_get('aat_wex', 'node');
+  if (isset($node->field_wex_file) && $node->field_wex_file['und'][0] === NULL) {
+    // var_dump($node->field_wex_file);
+    // var_dump('before merge', $values, $node); exit;
+  }
   $node = (object)array_merge((array)$node, $values);
+  if (isset($node->field_wex_file) && $node->field_wex_file['und'][0] === NULL) {
+    // var_dump('after', $node); exit;
+  }
+  // xdebug_start_trace();
   ctools_object_cache_set('aat_wex', 'node', $node);
   // drupal_set_message(print_r($values, TRUE));
   //drupal_set_message(print_r($node, TRUE));
@@ -223,12 +231,17 @@ function aat_wex_wizard_next(&$form_state) {
 function aat_wex_wizard_finish(&$form_state) {
   // xdebug_start_trace();
   // Mark the form as completed
+  var_dump('IN');
+  $node = ctools_object_cache_get('aat_wex', 'node'); // get the latest node object from the cache
+  var_dump('cached', $node); exit;
+  exit('finish');
   $form_state['complete'] = TRUE;
   aat_wex_wizard_next($form_state); // merge values from the last step as well
   $node = ctools_object_cache_get('aat_wex', 'node'); // get the latest node object from the cache
 
   // Save the node
   try {
+    var_dump($node); exit;
     node_save($node); // save the work experience
     // drupal_set_message(t('Thank you for submitting your work experience.')); // not needed
     // do some stuff
@@ -295,7 +308,8 @@ function aat_wex_maat_work_experience_validate(&$form, &$form_state) {
   $v = (object)$form_state['values'];
   $start_date = $v->field_wex_employment_start_date['und'][0]['value'];
   $end_date = $v->field_wex_employment_end['und'][0]['value'];
-  if (strtotime($end_date) < strtotime($start_date)) {
+  $is_finished = $v->field_employment_is_finished['und'][0]['value'];
+  if ($is_finished === 0 && strtotime($end_date) < strtotime($start_date)) {
     form_set_error('field_wex_employment_end', t("The end date can't be before you started your employment."));
   }
 }
diff --git a/docroot/sites/all/modules/custom/aat_wex/aat_wex.module b/docroot/sites/all/modules/custom/aat_wex/aat_wex.module
index 9f22dfc..0f7c4f9 100644
--- a/docroot/sites/all/modules/custom/aat_wex/aat_wex.module
+++ b/docroot/sites/all/modules/custom/aat_wex/aat_wex.module
@@ -76,6 +76,43 @@ function aat_wex_init() {
   var_dump($node); exit;
   // aat_wex_application_submitted($node);
   */
+
+  // Include ctools files
+  ctools_include('wizard');
+  ctools_include('object-cache');
+
+  $node_in = new stdClass(); // We create a new node object
+  $node_in->type = 'page'; // We set content type
+  ctools_object_cache_set('test', 'node', $node_in);
+  $test = ctools_object_cache_get('test', 'node');
+  $test->type = 'overriden';
+  $node_out = ctools_object_cache_get('test', 'node');
+  var_dump($node_out); exit;
+
+  // Store example node in ctools cache
+  $node_in = new stdClass(); // We create a new node object
+  $node_in->type = 'page'; // We set content type
+  $node_in->workflow = AAT_WEX_STATE_PENDING; // set default workflow state for Pending (5)
+  node_object_prepare($node);
+  $node_in->field_file['und'][0]['_weight'] = 0;
+  $node_in->field_file['und'][0]['fid'] = 0;
+  $node_in->field_file['und'][0]['display'] = 1;
+  $node_in->field_file['und'][0]['upload'] = '';
+  ctools_object_cache_set('test', 'node', $node_in);
+
+  $node = ctools_object_cache_get('test', 'node');
+  var_dump('cached_node:', $node);
+  $node->in_preview = TRUE;
+  // _field_invoke_multiple('load', 'node', array(NULL => $node)); // additional stuff from other modules
+  // field_attach_prepare_view('node', array(NULL => &$node), 'full'); // lets field types and formatters load additional data needed for display
+  // $build = node_view($node, 'full');
+
+  $node2 = ctools_object_cache_get('test', 'node');
+  var_dump('cached_node_again:', $node2); exit;
+}
+
+function change_ctools(&$cached) {
+  $cached = 'blah';
 }
 
 /**
