added attachbeads and fixed gaussian EM restraint