Better fix of atom numbering bug.