diff --git a/src/cluster/cluster.cpp b/src/cluster/cluster.cpp
index af292c1b7837f7bbda80ec21777b0467ca4a5968..87dd179148424f96d45ed8bd2b65cf94ca5670b5 100644
--- a/src/cluster/cluster.cpp
+++ b/src/cluster/cluster.cpp
@@ -620,7 +620,7 @@ void cluster(string config_file, string data_file, string output_path) {
 	  tppoanp_2->close();
 	  delete tppoanp_2;
 	  delete[] gaps_2;
-	  for (int ti = 0; ti <2 -1; ti++) {
+	  for (int ti = 0; ti < 2; ti++) {
 	    delete[] tqse_2[ti];
 	    delete[] tqce_2[ti];
 	    delete[] tqcs_2[ti];