Fixed the setter in updateAtomPositions()