fb85d0
diff --git a/src/parameters/persistent.cpp b/src/parameters/persistent.cpp
fb85d0
index 9a5688a..6a232cd 100644
fb85d0
--- a/src/parameters/persistent.cpp
fb85d0
+++ b/src/parameters/persistent.cpp
fb85d0
@@ -145,9 +145,6 @@ void save_parameters(const char *filename)
fb85d0
 
fb85d0
 //	printf("result size is %i, #parameters is %i \n", (int)past_results.size(), (int)all_parameters.parameters.size());
fb85d0
 
fb85d0
-	if (!global_power_valid())
fb85d0
-		return;
fb85d0
-
fb85d0
 	pathname = get_param_directory(filename);
fb85d0
 
fb85d0
 	file.open(pathname, ios::out);
fb85d0
@@ -156,12 +153,15 @@ void save_parameters(const char *filename)
fb85d0
 		return;
fb85d0
 	}
fb85d0
 
fb85d0
-	map<string, int>::iterator it;
fb85d0
+	if (global_power_valid())
fb85d0
+	{
fb85d0
+		map<string, int>::iterator it;
fb85d0
 
fb85d0
-	for (it = param_index.begin(); it != param_index.end(); it++) {
fb85d0
-		int index;
fb85d0
-		index = it->second;
fb85d0
-		file << it->first << "\t" << setprecision(9) << all_parameters.parameters[index] << "\n";
fb85d0
+		for (it = param_index.begin(); it != param_index.end(); it++) {
fb85d0
+			int index;
fb85d0
+			index = it->second;
fb85d0
+			file << it->first << "\t" << setprecision(9) << all_parameters.parameters[index] << "\n";
fb85d0
+		}
fb85d0
 	}
fb85d0
 	file.close();
fb85d0
 }