Index: src/UIElements/Views/Qt4/QDebugStream.hpp
===================================================================
--- src/UIElements/Views/Qt4/QDebugStream.hpp	(revision 19dfdf7a57ea6922cc8f70fc0fcfc9892599fb26)
+++ src/UIElements/Views/Qt4/QDebugStream.hpp	(revision 3fa16b482f696edb18618700ef768e366d06813c)
@@ -33,5 +33,7 @@
 {
 public:
-  QDebugStream(std::ostream &stream, QTextEdit* text_edit) : m_stream(stream)
+  QDebugStream(std::ostream &stream, QTextEdit* text_edit) :
+    m_stream(stream),
+    printing(false)
   {
     log_window = text_edit;
@@ -54,7 +56,10 @@
   {
     if (v == '\n') {
+      while (printing);
+      printing = true;
       log_window->append(m_string.c_str());
       qDebug() << m_string.c_str();
       m_string.erase(m_string.begin(), m_string.end());
+      printing = false;
     } else
       m_string += v;
@@ -65,5 +70,8 @@
   virtual std::streamsize xsputn(const char *p, std::streamsize n)
   {
+    while (printing);
+    printing = true;
     m_string.append(p, p + n);
+    printing = false;
 
     size_t pos = 0;
@@ -72,7 +80,10 @@
       if (pos != std::string::npos) {
         std::string tmp(m_string.begin(), m_string.begin() + pos);
+        while (printing);
+        printing = true;
         log_window->append(tmp.c_str());
         qDebug() << tmp.c_str();
         m_string.erase(m_string.begin(), m_string.begin() + pos + 1);
+        printing = false;
       }
     }
@@ -86,4 +97,6 @@
   std::string m_string;
 
+  bool printing;
+
   QTextEdit* log_window;
 };
Index: src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject.cpp
===================================================================
--- src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject.cpp	(revision 19dfdf7a57ea6922cc8f70fc0fcfc9892599fb26)
+++ src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject.cpp	(revision 3fa16b482f696edb18618700ef768e366d06813c)
@@ -169,8 +169,8 @@
    painter->modelViewMatrix().push();
    painter->modelViewMatrix().translate(m_position);
+   if (m_rotationAngle != 0.0f)
+     painter->modelViewMatrix().rotate(m_rotationAngle, m_rotationVector);
    if ((m_scaleX != 1.0f) || (m_scaleY != 1.0f) || (m_scaleZ != 1.0f))
      painter->modelViewMatrix().scale(m_scaleX, m_scaleY, m_scaleZ);
-   if (m_rotationAngle != 0.0f)
-     painter->modelViewMatrix().rotate(m_rotationAngle, m_rotationVector);
 
    // Apply the material and effect to the painter.
Index: src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_bond.cpp
===================================================================
--- src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_bond.cpp	(revision 19dfdf7a57ea6922cc8f70fc0fcfc9892599fb26)
+++ src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_bond.cpp	(revision 3fa16b482f696edb18618700ef768e366d06813c)
@@ -329,12 +329,10 @@
     }
   }
-  if (DoResetPosition) {
+  if (DoResetPosition)
     resetPosition();
+  if (DoResetWidth)
+    resetWidth();
+  if ((DoResetPosition) || (DoResetWidth))
     emit changed();
-  }
-  if (DoResetWidth) {
-    resetWidth();
-    emit changed();
-  }
 }
 
Index: src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_molecule.cpp
===================================================================
--- src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_molecule.cpp	(revision 19dfdf7a57ea6922cc8f70fc0fcfc9892599fb26)
+++ src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_molecule.cpp	(revision 3fa16b482f696edb18618700ef768e366d06813c)
@@ -71,6 +71,16 @@
   double minradius = 2.; // TODO: set to maximum bond length value
   LOG(3, "DEBUG: Molecule fits into sphere of radius " << minradius);
-  if (minradius < 1.)
-    minradius = 1.;
+  // check minimum bond radius in molecule
+  double minlength = std::numeric_limits<double>::max(); 
+  for (molecule::const_iterator iter = molref->begin();
+      iter != molref->end(); ++iter) {
+    const BondList &ListOfBonds = (*iter)->getListOfBonds();
+    for (BondList::const_iterator bonditer = ListOfBonds.begin();
+         bonditer != ListOfBonds.end(); ++bonditer) {
+      const double bond_distance = (*bonditer)->GetDistance();
+      minlength = std::min(bond_distance, minlength);
+    }
+  }
+  minradius = std::max( std::max(minradius, minlength), 1.);
 
   QGeometryData geo;
@@ -457,8 +467,8 @@
     painter->modelViewMatrix().push();
     painter->modelViewMatrix().translate(m_position);
+    if (m_rotationAngle != 0.0f)
+      painter->modelViewMatrix().rotate(m_rotationAngle, m_rotationVector);
     if ((m_scaleX != 1.0f) || (m_scaleY != 1.0f) || (m_scaleZ != 1.0f))
       painter->modelViewMatrix().scale(m_scaleX, m_scaleY, m_scaleZ);
-    if (m_rotationAngle != 0.0f)
-      painter->modelViewMatrix().rotate(m_rotationAngle, m_rotationVector);
 
     // Draw a box around the mesh, if selected.
