fix a couple of problems with breaking bonds and shaking