Index: src/Actions/AtomAction/ChangeElementAction.cpp
===================================================================
--- src/Actions/AtomAction/ChangeElementAction.cpp	(revision f0a3ec30883f7671a6d9b42f3fef781efea8f232)
+++ src/Actions/AtomAction/ChangeElementAction.cpp	(revision 54b95350c635ef205ff520b17801e884164b717f)
@@ -36,10 +36,11 @@
   std::vector<element *> elements;
 
-  dialog->queryElement(NAME, &elements, MapOfActions::getInstance().getDescription(NAME));
-  dialog->queryAtom("atom-by-id", &first, MapOfActions::getInstance().getDescription("atom-by-id"));
+  dialog->queryAtom(NAME, &first, MapOfActions::getInstance().getDescription(NAME));
+  dialog->queryElement("element", &elements, MapOfActions::getInstance().getDescription("element"));
 
   if(dialog->display()) {
     delete dialog;
     ASSERT(elements.size() == 1, "Unequal to one element specified when changing an atom's element");
+    ASSERT(first != NULL, "No valid atom specified");
     DoLog(1) && (Log() << Verbose(1) << "Changing atom " << *first << " to element " << elements.at(0) << "." << endl);
     if (elements.at(0) != NULL) {
Index: src/Actions/MapOfActions.cpp
===================================================================
--- src/Actions/MapOfActions.cpp	(revision f0a3ec30883f7671a6d9b42f3fef781efea8f232)
+++ src/Actions/MapOfActions.cpp	(revision 54b95350c635ef205ff520b17801e884164b717f)
@@ -103,4 +103,5 @@
   DescriptionMap["version"] = "show version";
   // keys for values
+  DescriptionMap["atom-by-id"] = "index of an atom";
   DescriptionMap["bin-output-file"] = "name of the bin output file";
   DescriptionMap["bin-end"] = "start of the last bin";
@@ -170,5 +171,5 @@
   TypeMap["center-in-box"] = Box;
   TypeMap["change-box"] = Box;
-  TypeMap["change-element"] = Element;
+  TypeMap["change-element"] = Atom;
   TypeMap["change-molname"] = String;
   TypeMap["convex-envelope"] = Molecule;
@@ -203,4 +204,5 @@
 
   // value types for the values
+  TypeMap["atom-by-id"] = Atom;
   TypeMap["bin-output-file"] = String;
   TypeMap["bin-end"] = Double;
@@ -225,4 +227,5 @@
   DefaultValue["bin-width"] = "0.5";
   DefaultValue["fastparsing"] = "0";
+  DefaultValue["atom-by-id"] = "-1";
   DefaultValue["molecule-by-id"] = "-1";
   DefaultValue["periodic"] = "0";
@@ -239,5 +242,5 @@
 	generic.insert("change-box");
 //  generic.insert("change-molname");
-//	generic.insert("change-element");
+	generic.insert("change-element");
 //  generic.insert("convex-envelope");
 	generic.insert("default-molname");
@@ -282,4 +285,5 @@
 
     // hidden arguments
+  generic.insert("atom-by-id");
   generic.insert("bin-end");
   generic.insert("bin-output-file");
Index: src/builder.cpp
===================================================================
--- src/builder.cpp	(revision f0a3ec30883f7671a6d9b42f3fef781efea8f232)
+++ src/builder.cpp	(revision 54b95350c635ef205ff520b17801e884164b717f)
@@ -1804,15 +1804,14 @@
             case 'E':
               if (ExitFlag == 0) ExitFlag = 1;
-              if ((argptr+1 >= argc) || (!IsValidNumber(argv[argptr])) || (argv[argptr+1][0] == '-')) {
+              if ((argptr+2 >= argc) || (!IsValidNumber(argv[argptr]))) {
                 ExitFlag = 255;
-                DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for changing element: -E <atom nr.> <element>" << endl);
+                DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for changing element: -E <atom nr.> --element <Z>" << endl);
                 performCriticalExit();
               } else {
-                mol->getAtomCount();
-                SaveFlag = true;
-                DoLog(1) && (Log() << Verbose(1) << "Changing atom " << argv[argptr] << " to element " << argv[argptr+1] << "." << endl);
-                first = mol->FindAtom(atoi(argv[argptr]));
-                first->type = periode->FindElement(atoi(argv[argptr+1]));
-                argptr+=2;
+                ArgcList.insert(argptr-1);
+                ArgcList.insert(argptr);
+                ArgcList.insert(argptr+1);
+                ArgcList.insert(argptr+2);
+                argptr+=3;
               }
               break;
