 
       else if (tid == abs(1 - loc_working_thread)) {
         // The non-working thread should update the preconditioner
-        cout << "SYSTEM " << tid << " UPDATE PRECONDITIONER... " << endl;
+        cout << "  SYSTEM " << tid << " UPDATE PRECONDITIONER... " << endl;
         sys[tid]->updatePreconditioner();
 
         omp_set_lock(&g_lock);
+        updateDone = true;
+        cout << "  PRECONDITIONER UPDATE COMPLETE (" << sys[tid]->precUpdated << ")" << endl;
         workingThread = abs(1 - workingThread);
-        cout << "PRECONDITIONER UPDATE COMPLETE (" << sys[tid]->precUpdated << ")" << endl;
         omp_unset_lock(&g_lock);
       }
 
       // If the preconditioner has been updated, or the working thread fails to solve the problem, do a switch
-      if (sys[abs(1-loc_working_thread)]->precUpdated) {
+      if (updateDone) {
 
 #pragma omp barrier
         if (sys[loc_working_thread]->time >= t_end) break;

        {
          cout << "SWITCH SYSTEM " << loc_working_thread << " -> " << abs(1-loc_working_thread) << "... ";
          sys[loc_working_thread]->transferState(sys[abs(1-loc_working_thread)]);
          cout << "SWITCH COMPLETE." << endl;
        }
      }

    if(deviceCount>1) {
      sys[sysIndex] = new ANCFSystem(sysIndex);
    } else {
      sys[sysIndex] = new ANCFSystem(); // Create both systems on the same device
    }

    sys[sysIndex]->setTimeStep(hh, 1e-10);
