diff --git a/simulation/CCC.cpp b/simulation/CCC.cpp
index b65ff8d16ba5a680101940e02af13aa29221cc98..c5299ffb0775b5444b50523f8b8a4ec7e47470cc 100644
--- a/simulation/CCC.cpp
+++ b/simulation/CCC.cpp
@@ -231,7 +231,7 @@ void compute(const Options& option){
 
   // Get solver to use ASM (if PETSc) //
   IS is[2];
-  try{
+  if(!solver.compare("petsc")){
     SolverPETSc<double>& solver =
       dynamic_cast<SolverPETSc<double>&>(system.getSolver());
 
@@ -250,8 +250,6 @@ void compute(const Options& option){
     // Setup subsolvers
     solver.setPostKSPSetUp(asmSubSolver);
   }
-  catch(...){
-  }
 
   // Solve //
   cout << "Solving..." << endl << flush;
@@ -310,14 +308,12 @@ void compute(const Options& option){
   }
 
   // Clear PETSc stuff (if we used PETSc) //
-  try{
+  if(!solver.compare("petsc")){
     dynamic_cast<SolverPETSc<double>&>(system.getSolver());
 
     ISDestroy(&is[0]);
     ISDestroy(&is[1]);
   }
-  catch(...){
-  }
 
   // Clear other stuff //
   for(int i = 0; i < nPhi; i++)