diff --git a/modules/mol/alg/src/molck.cc b/modules/mol/alg/src/molck.cc
index 0667275af4a20db3500d68caf5136bc0c57fbb86..e1c35083fca0a424e1b05a7eba5973e8d5e7ead3 100644
--- a/modules/mol/alg/src/molck.cc
+++ b/modules/mol/alg/src/molck.cc
@@ -8,7 +8,8 @@ using namespace ost::conop;
 using namespace ost::mol;
 
 
-EntityHandle ost::mol::alg::MapNonStandardResidues(EntityHandle& ent, CompoundLibPtr lib) {
+void ost::mol::alg::MapNonStandardResidues(EntityHandle& ent, CompoundLibPtr lib) {
+  // TODO: Maybe it is possible to make it in-place operation
   EntityHandle new_ent=CreateEntity();  
   ChainHandleList chains=ent.GetChainList();
   XCSEditor new_edi=new_ent.EditXCS();
@@ -40,7 +41,7 @@ EntityHandle ost::mol::alg::MapNonStandardResidues(EntityHandle& ent, CompoundLi
       }   
     }        
   }
-  return new_ent;
+  ent = new_ent;
 }
 
 void ost::mol::alg::RemoveAtoms(
@@ -147,7 +148,7 @@ void ost::mol::alg::Molck(
            ost::conop::CompoundLibPtr lib,
            const ost::mol::alg::MolckSettings& settings=ost::mol::alg::MolckSettings()){
   if (settings.map_nonstd_res)  {
-    ent = ost::mol::alg::MapNonStandardResidues(ent, lib);
+    ost::mol::alg::MapNonStandardResidues(ent, lib);
   }
   ost::mol::alg::RemoveAtoms(ent, 
               lib, 
diff --git a/modules/mol/alg/src/molck.hh b/modules/mol/alg/src/molck.hh
index 566261d763c1859c507fea092b3db0280cd5d6b9..fea0ef177620f590c26761045e3b51e262b19ed9 100644
--- a/modules/mol/alg/src/molck.hh
+++ b/modules/mol/alg/src/molck.hh
@@ -69,7 +69,7 @@ struct MolckSettings{
 
 };
 
-ost::mol::EntityHandle MapNonStandardResidues(ost::mol::EntityHandle& ent,
+void MapNonStandardResidues(ost::mol::EntityHandle& ent,
                                               ost::conop::CompoundLibPtr lib);
 
 void RemoveAtoms(ost::mol::EntityHandle& ent,