diff --git a/irdb-libs/ir_builders/read_ehframe.cpp b/irdb-libs/ir_builders/read_ehframe.cpp
index 17dd5f8c673ec71a17105a50bee17d77e7a79ce9..602f084c2b394a142adabf8fb4b71fed38ea3e26 100644
--- a/irdb-libs/ir_builders/read_ehframe.cpp
+++ b/irdb-libs/ir_builders/read_ehframe.cpp
@@ -871,14 +871,12 @@ void read_ehframe(FileIR_t* virp, EXEIO::exeio* exeiop)
 	int eh_frame_index;
        	for (secndx=1; secndx<secnum; secndx++)
        	{
-		// cout<<"sechdrs["<<i<<"] name index="<<sechdrs[secndx].sh_name<<endl;
-               	const char *p=elfiop->sections[secndx]->get_name().c_str(); 
-               	if (strcmp(".eh_frame",p)==0)
+               	if (elfiop->sections[secndx]->get_name() == ".eh_frame")
                	{
                        	found = true;
 			eh_frame_index=secndx;
                        	break;
-               	};
+               	}
        	}
 
 	if(!found)
@@ -892,8 +890,7 @@ void read_ehframe(FileIR_t* virp, EXEIO::exeio* exeiop)
 	cout<<"Found .eh_frame section addr is "<<std::dec<<eh_frame_addr<<endl;
 	int total_size=0;
 
-	const char *p=elfiop->sections[secndx+1]->get_name().c_str(); 
-        if (strcmp(".gcc_except_table",p)!=0)
+        if (elfiop->sections[secndx+1]->get_name() != ".gcc_except_table")
 	{
 		cout<<"Did not find .gcc_except_table immediately after .eh_frame\n";
 		total_size=elfiop->sections[eh_frame_index]->get_size()+1;
@@ -901,8 +898,8 @@ void read_ehframe(FileIR_t* virp, EXEIO::exeio* exeiop)
 	else
 	{
 		total_size=
-		(elfiop->sections[eh_frame_index+1]->get_address()+
-		 elfiop->sections[eh_frame_index+1]->get_size()   ) - (uintptr_t)eh_frame_addr;
+			(elfiop->sections[eh_frame_index+1]->get_address()+
+			 elfiop->sections[eh_frame_index+1]->get_size()   ) - (uintptr_t)eh_frame_addr;
 	}
 	eh_frame_data_total_size=total_size;
 	
diff --git a/irdb-libs/thanos/thanos.cpp b/irdb-libs/thanos/thanos.cpp
index e336c3307ff9e4ab7a1e3387c74943f9c3fea7fe..84941d3ffe01b9a29872a98ea8d385a70e46cae0 100644
--- a/irdb-libs/thanos/thanos.cpp
+++ b/irdb-libs/thanos/thanos.cpp
@@ -316,7 +316,8 @@ int ThanosPlugin_t::runPlugin()
 
 void ThanosPlugin_t::tidyIR()
 {
-	optind=1;
+	optind=0;	// despite documentation, implementation inits this to 0, which causes a full re-init of getopts
+			// setting back to 1 leads to memory errors!
 	shared_objects->tidyIR();
 }