diff --git a/src/FqBaseBackend.h b/src/FqBaseBackend.h
index 7324cec5a25afc001bfb40780755ac2d30c2d80c..3ffe1962cd5d50523b63dfa87a8cdc32af8c3f66 100644
--- a/src/FqBaseBackend.h
+++ b/src/FqBaseBackend.h
@@ -136,7 +136,10 @@ public:
             free(o_buf);
             o_buf=NULL;
         }
-        delete cur_fq_record;
+        if (cur_fq_record !=NULL) {
+        	delete cur_fq_record;
+        	cur_fq_record=NULL;
+        }
     }
 
     void openInputFile(char * ficname, unsigned char id);
@@ -147,11 +150,7 @@ public:
     void openOutputFile();
     void writeToOutput(const unsigned long&);
     void closeOutputFile();
-    /*void setUndefFile(char * ficname);
-    void openUndefFile();
-    void writeStrToUndefFile(char * start_in_buf, int len);
-    void writeToUndefFile(const T_buf_info& buf_info,const int& addCR=0);
-    void closeUndefFile();*/
+
 
     static void setQualThreshold(const FasqQualThreshold& a_qual_thres){
         FqBaseBackend::qual_thres.min_correct_k_mers_in_read=a_qual_thres.min_correct_k_mers_in_read;