Index: src/UIElements/TextUI/TextDialog.cpp
===================================================================
--- src/UIElements/TextUI/TextDialog.cpp	(revision 4a611e3670a1f64878803f279635ff022e7471c1)
+++ src/UIElements/TextUI/TextDialog.cpp	(revision 4e10f5d3fadc22df7922e32755bde52849c4ba53)
@@ -25,4 +25,6 @@
 #include "molecule.hpp"
 #include "vector.hpp"
+#include "Matrix.hpp"
+#include "Box.hpp"
 
 using namespace std;
@@ -70,9 +72,9 @@
 }
 
-void TextDialog::queryVector(const char* title, Vector *target,const double *const cellSize, bool check, string description) {
-  registerQuery(new VectorTextQuery(title,target,cellSize,check,description));
-}
-
-void TextDialog::queryBox(const char* title,double ** const cellSize, string description) {
+void TextDialog::queryVector(const char* title, Vector *target, bool check, string description) {
+  registerQuery(new VectorTextQuery(title,target,check,description));
+}
+
+void TextDialog::queryBox(const char* title,Box* cellSize, string description) {
   registerQuery(new BoxTextQuery(title,cellSize,description));
 }
@@ -270,6 +272,6 @@
 }
 
-TextDialog::VectorTextQuery::VectorTextQuery(std::string title, Vector *_target, const double *const _cellSize, bool _check, std::string _description) :
-    Dialog::VectorQuery(title,_target,_cellSize,_check,_description)
+TextDialog::VectorTextQuery::VectorTextQuery(std::string title, Vector *_target, bool _check, std::string _description) :
+    Dialog::VectorQuery(title,_target,_check,_description)
 {}
 
@@ -280,17 +282,16 @@
   Log() << Verbose(0) << getTitle();
 
+  const Matrix &M = World::getInstance().getDomain().getM();
   char coords[3] = {'x','y','z'};
-  int j = -1;
   for (int i=0;i<3;i++) {
-    j += i+1;
     do {
-      Log() << Verbose(0) << coords[i] << "[0.." << cellSize[j] << "]: ";
+      Log() << Verbose(0) << coords[i] << "[0.." << M.at(i,i) << "]: ";
       cin >> (*tmp)[i];
-    } while ((((*tmp)[i] < 0) || ((*tmp)[i] >= cellSize[j])) && (check));
+    } while ((((*tmp)[i] < 0) || ((*tmp)[i] >= M.at(i,i))) && (check));
   }
   return true;
 }
 
-TextDialog::BoxTextQuery::BoxTextQuery(std::string title, double ** const _cellSize, std::string _description) :
+TextDialog::BoxTextQuery::BoxTextQuery(std::string title, Box* _cellSize, std::string _description) :
     Dialog::BoxQuery(title,_cellSize,_description)
 {}
Index: src/UIElements/TextUI/TextDialog.hpp
===================================================================
--- src/UIElements/TextUI/TextDialog.hpp	(revision 4a611e3670a1f64878803f279635ff022e7471c1)
+++ src/UIElements/TextUI/TextDialog.hpp	(revision 4e10f5d3fadc22df7922e32755bde52849c4ba53)
@@ -32,6 +32,6 @@
   virtual void queryAtom(const char*,atom**,std::string = "");
   virtual void queryMolecule(const char*,molecule**,std::string = "");
-  virtual void queryVector(const char*,Vector *,const double * const,bool, std::string = "");
-  virtual void queryBox(const char*,double ** const, std::string = "");
+  virtual void queryVector(const char*,Vector *,bool, std::string = "");
+  virtual void queryBox(const char*,Box*, std::string = "");
   virtual void queryElement(const char*, std::vector<element *> *, std::string = "");
 
@@ -96,5 +96,5 @@
   class VectorTextQuery : public Dialog::VectorQuery {
   public:
-    VectorTextQuery(std::string title,Vector *_target,const double *const _cellSize,bool _check, std::string _description = NULL);
+    VectorTextQuery(std::string title,Vector *_target,bool _check, std::string _description = NULL);
     virtual ~VectorTextQuery();
     virtual bool handle();
@@ -103,5 +103,5 @@
   class BoxTextQuery : public Dialog::BoxQuery {
   public:
-    BoxTextQuery(std::string title,double ** const _cellSize, std::string _description = NULL);
+    BoxTextQuery(std::string title,Box* _cellSize, std::string _description = NULL);
     virtual ~BoxTextQuery();
     virtual bool handle();
Index: src/UIElements/TextUI/TextWindow.hpp
===================================================================
--- src/UIElements/TextUI/TextWindow.hpp	(revision 4a611e3670a1f64878803f279635ff022e7471c1)
+++ src/UIElements/TextUI/TextWindow.hpp	(revision 4e10f5d3fadc22df7922e32755bde52849c4ba53)
@@ -11,4 +11,5 @@
 #include "MainWindow.hpp"
 
+#include <string>
 #include <set>
 
