Index: molecuilder/src/molecules.cpp
===================================================================
--- molecuilder/src/molecules.cpp	(revision e565a853608ac70901db3fc9cb1e7d070f97fa47)
+++ molecuilder/src/molecules.cpp	(revision 661288edf01e191a7d16c24471e665782a5aa981)
@@ -1871,4 +1871,9 @@
     } // else it's "-1" or else and thus must not be added
   }
+  *out << Verbose(1) << "The scanned KeySet is ";
+  for(KeySet::iterator runner = CurrentSet.begin(); runner != CurrentSet.end(); runner++) {
+    *out << (*runner) << "\t";
+  }
+  *out << endl;
   return (status != 0);
 };
@@ -2151,5 +2156,18 @@
           BondFragments[FragmentCounter] = NULL;
           if (Scheme == ANOVA) {
-            BondFragments[FragmentCounter] = MolecularWalker->Leaf->FragmentBOSSANOVA(out,BottomUpOrder,configuration);
+            Graph *FragmentList = MolecularWalker->Leaf->FragmentBOSSANOVA(out,BottomUpOrder,configuration);
+
+            // allocate memory for the pointer array and transmorph graphs into full molecular fragments
+            int TotalNumberOfMolecules = 0;
+            for(Graph::iterator runner = FragmentList->begin(); runner != FragmentList->end(); runner++)
+              TotalNumberOfMolecules++;
+            BondFragments[FragmentCounter] = new MoleculeListClass(TotalNumberOfMolecules, AtomCount);
+            int k=0;
+            for(Graph::iterator runner = FragmentList->begin(); runner != FragmentList->end(); runner++) {
+              KeySet test = (*runner).first;
+              BondFragments[FragmentCounter]->ListOfMolecules[k] = StoreFragmentFromKeySet(out, test, configuration);
+              BondFragments[FragmentCounter]->TEList[k] = ((*runner).second).second;
+              k++;
+            }
           }  
           if ((Scheme == BottomUp) || (Scheme == Combined)) { // get overlapping subgraphs
@@ -2802,5 +2820,5 @@
   // first create the minimal set of atoms from the KeySet
   for(KeySet::iterator runner = Leaflet.begin(); runner != Leaflet.end(); runner++) {
-    FatherOfRunner =  FindAtom((*runner));  // find the id
+    FatherOfRunner = FindAtom((*runner));  // find the id
     SonList[FatherOfRunner->nr] = Leaf->AddCopyAtom(FatherOfRunner);
   }
@@ -3135,7 +3153,7 @@
           //if ((!FragmentSearch->UsedList[OtherWalker->nr][i]) && (FragmentSearch->Labels[OtherWalker->nr] > FragmentSearch->Labels[FragmentSearch->Root->nr])) { 
             //*out << Verbose(2+verbosity) << "Not used so far, label " << FragmentSearch->Labels[OtherWalker->nr] << " is bigger than Root's " << FragmentSearch->Labels[FragmentSearch->Root->nr] << "." << endl;
-          *out << Verbose(2+verbosity) << "Adding " << *OtherWalker << "." << endl;
+          *out << Verbose(2+verbosity) << "Adding " << *OtherWalker << " with nr " << OtherWalker->nr << "." << endl;
           TouchedList[TouchedIndex++] = OtherWalker->nr;  // note as added
-          FragmentSearch->FragmentSet->insert( FragmentSearch->FragmentSet->end(), OtherWalker->nr);
+          FragmentSearch->FragmentSet->insert(OtherWalker->GetTrueFather()->nr);
             //FragmentSearch->UsedList[OtherWalker->nr][i] = true;
           //}
@@ -3314,5 +3332,5 @@
       }
       Walker = FindAtom(AtomKeyNr);
-      *out << Verbose(0) << "Current Walker is: " << *Walker << " with label " << FragmentSearch.Labels[AtomKeyNr] << " and SP of " << SP << "." << endl;
+      *out << Verbose(0) << "Current Walker is: " << *Walker << " with nr " << Walker->nr << " and label " << FragmentSearch.Labels[AtomKeyNr] << " and SP of " << SP << "." << endl;
       // check for new sp level
       // go through all its bonds
@@ -3326,5 +3344,5 @@
 #endif
                                                               ) {  // skip hydrogens and restrict to fragment
-          *out << Verbose(2) << "Current partner is " << *OtherWalker << " in bond " << *Binder << "." << endl;
+          *out << Verbose(2) << "Current partner is " << *OtherWalker << " with nr " << OtherWalker->nr << " in bond " << *Binder << "." << endl;
           // set the label if not set (and push on root stack as well)
           if (FragmentSearch.Labels[OtherWalker->nr] == -1) {
@@ -3408,5 +3426,5 @@
       *out << Verbose(0) << "Starting fragment generation with " << *FragmentSearch.Root << "." << endl;
       FragmentSearch.FragmentSet->clear();  
-      FragmentSearch.FragmentSet->insert(FragmentSearch.Root->nr);
+      FragmentSearch.FragmentSet->insert(FragmentSearch.Root->GetTrueFather()->nr);
       
       if (FragmentSearch.FragmentSet->size() == (unsigned int) Order) {
@@ -3681,10 +3699,10 @@
  * \param ANOVAOrder ANOVA expansion is truncated above this order
  * \param *configuration configuration for writing config files for each fragment
- * \return pointer to MoleculeListClass with all the fragments or NULL if something went wrong.
- */
-MoleculeListClass * molecule::FragmentBOSSANOVA(ofstream *out, int ANOVAOrder, config *configuration)
+ * \return pointer to Graph list
+ */
+Graph * molecule::FragmentBOSSANOVA(ofstream *out, int ANOVAOrder, config *configuration)
 {
   Graph *FragmentList = NULL, ***FragmentLowerOrdersList = NULL;
-  MoleculeListClass *FragmentMoleculeList = NULL;
+  //MoleculeListClass *FragmentMoleculeList = NULL;
   int Order, NumLevels, NumMolecules, TotalNumMolecules = 0, *NumMoleculesOfOrder = NULL;
   int counter = 0;
@@ -3702,5 +3720,5 @@
   while (Walker->next != end) {
     Walker = Walker->next;
-    CompleteMolecule.insert(Walker->nr);
+    CompleteMolecule.insert(Walker->GetTrueFather()->nr);
   } 
 
@@ -3775,17 +3793,7 @@
   Free((void **)&FragmentLowerOrdersList, "molecule::FragmentBOSSANOVA: ***FragmentLowerOrdersList");
   Free((void **)&NumMoleculesOfOrder, "molecule::FragmentBOSSANOVA: *NumMoleculesOfOrder");
-  // allocate memory for the pointer array and transmorph graphs into full molecular fragments
-  FragmentMoleculeList = new MoleculeListClass(TotalNumMolecules, AtomCount);
-  int k=0;
-  for(Graph::iterator runner = FragmentList->begin(); runner != FragmentList->end(); runner++) {
-    KeySet test = (*runner).first;
-    FragmentMoleculeList->ListOfMolecules[k] = StoreFragmentFromKeySet(out, test, configuration);
-    FragmentMoleculeList->TEList[k] = ((*runner).second).second;
-    k++;
-  }
   
   *out << Verbose(0) << "End of FragmentBOSSANOVA." << endl;
-  delete(FragmentList); 
-  return FragmentMoleculeList;
+  return FragmentList;
 };
 
Index: molecuilder/src/molecules.hpp
===================================================================
--- molecuilder/src/molecules.hpp	(revision e565a853608ac70901db3fc9cb1e7d070f97fa47)
+++ molecuilder/src/molecules.hpp	(revision 661288edf01e191a7d16c24471e665782a5aa981)
@@ -532,5 +532,5 @@
   void FragmentMoleculeByBond(ofstream *out, bond *Bond, molecule **LeftFragment, molecule **RightFragment, bool IsAngstroem, enum CutCyclicBond CutCyclic);
   /// -# BOSSANOVA
-	MoleculeListClass * FragmentBOSSANOVA(ofstream *out, int ANOVAOrder, config *configuration);
+  Graph * FragmentBOSSANOVA(ofstream *out, int ANOVAOrder, config *configuration);
 	int CreateListOfUniqueFragmentsOfOrder(ofstream *out, int Order, Graph *ListOfGraph, KeySet Fragment, double TEFactor, config *configuration);
   bool BuildInducedSubgraph(ofstream *out, const molecule *Father);
