diff --git a/sources/poly.cpp b/sources/poly.cpp
index 19ef35c..00ed918 100755
--- a/sources/poly.cpp
+++ b/sources/poly.cpp
@@ -44,7 +44,7 @@
 * the polygon is located
 */
 void Poly::setCenter(Vec c) {
-	position = c.clone();
+  position = c.clone();
 }
 
 /*
@@ -77,6 +77,7 @@
 */
 void Poly::setPosition(Vec newcenter) {
 	Vec diff = newcenter - (*position);
+	delete position;
 	position = newcenter.clone();
 
 	for ( std::vector<Vec*>::size_type i = 0; i < initpoints.size(); i++ ) {
@@ -118,7 +119,7 @@
 	//glNormal3fv(  v1.cross(v2)+ *(Vec*)((*initpoints)[0]).c  );
 	//glNormal3fv(  v1.cross(v2) + ((Vec*)initpoints->get(0))->c  );
 
-	Vec* mv;
+	Vec mv;
 
 	for ( std::vector<Vec*>::size_type i = 0; i < initpoints.size(); i++ ) {
 		color->drawColor();
@@ -126,8 +127,8 @@
 		out = rotate_x(out);
 		out = rotate_y(out);
 		out = rotate_z(out);
-		mv = (*position + out).clone();
-		glVertex3fv(mv->c);
+		mv = *position + out;
+		glVertex3fv(mv.c);
 	}
 	glEnd();
 }