diff --git a/modules/mol/alg/src/construct_cbeta.cc b/modules/mol/alg/src/construct_cbeta.cc
index c7466ef1e46db1d8cff38e98f187021bf560234f..f4c04f1d580b96f6fe9b98404555603d6a3524a5 100644
--- a/modules/mol/alg/src/construct_cbeta.cc
+++ b/modules/mol/alg/src/construct_cbeta.cc
@@ -12,14 +12,16 @@ namespace detail {
 
 class CBetaInserter:public EntityVisitor {
 public:
-  CBetaInserter(mol::EntityHandle ent);
+  CBetaInserter(mol::EntityHandle ent, bool include_gly);
 
   virtual bool VisitResidue(const mol::ResidueHandle& res);
 private:
   XCSEditor edi_;
+  bool      include_gly_;
 };
-CBetaInserter::CBetaInserter(mol::EntityHandle ent) {
+CBetaInserter::CBetaInserter(mol::EntityHandle ent, bool include_gly) {
   edi_=ent.EditXCS(BUFFERED_EDIT);
+  include_gly_=include_gly;
 }
 
 bool CBetaInserter::VisitResidue(const mol::ResidueHandle& res)
@@ -53,8 +55,7 @@ bool CBetaInserter::VisitResidue(const mol::ResidueHandle& res)
 // ensure that C-betas are added to the view as well
 void ConstructCBetas(mol::EntityHandle& entity_handle, bool include_gly)
 {
-  include_gly_=include_gly;
-  detail::CBetaInserter cbi(entity_handle);
+  detail::CBetaInserter cbi(entity_handle, include_gly);
   entity_handle.Apply(cbi);
 }
 
diff --git a/modules/mol/alg/src/construct_cbeta.hh b/modules/mol/alg/src/construct_cbeta.hh
index ad59bf8d5ffd50da772819fa5b6e7818120de8f5..994dfd7a0e17ad685ad29cdb3bf9d05383ce6f09 100644
--- a/modules/mol/alg/src/construct_cbeta.hh
+++ b/modules/mol/alg/src/construct_cbeta.hh
@@ -26,16 +26,16 @@ namespace ost { namespace mol { namespace alg {
 
 
 geom::Vec3 DLLEXPORT_OST_MOL_ALG CBetaPosition(const ResidueHandle& residue, 
-                                     Real bond_length=1.5);
+                                               Real bond_length=1.5);
 
 geom::Vec3 DLLEXPORT_OST_MOL_ALG CBetaPosition(const geom::Vec3& n_pos, 
-                                     const geom::Vec3& ca_pos, 
-                                     const geom::Vec3& c_pos, 
-                                     Real bond_length=1.5);
+                                               const geom::Vec3& ca_pos, 
+                                               const geom::Vec3& c_pos, 
+                                               Real bond_length=1.5);
 
-void DLLEXPORT_OST_MOL_ALG ConstructCBetas(EntityHandle& entity_handle, bool include_gly=false);
+void DLLEXPORT_OST_MOL_ALG ConstructCBetas(EntityHandle& entity_handle, 
+                                           bool include_gly=false);
 
-bool include_gly_;
 
 }}} // ns