diff --git a/Embedding.cc b/Embedding.cc
index 6ed84f99b98ed2e08dd3e9b1d74124bc8a18423e..d6543078373d7d166211c6fb1d52b5975e6e0650 100644
--- a/Embedding.cc
+++ b/Embedding.cc
@@ -200,7 +200,19 @@ void Embedding::RandomTriangulation(TriMesh &base_mesh, PolyMesh &meta_mesh, dou
   while (!TriangulationPipeline(meta_mesh_points)) {
     meta_mesh_points.clear();
     qDebug() << "Automatically remeshing";
+    // TODO: There is a memory leak somewhere in here that shows when Triangulation has to
+    // be repeated many times because some Voronoi regions were of the wrong Euler characteristic.
+    // In those cases TriangulationPipeline returns false, and everything is repeated.
+    // Calling clear() here does not seem to deallocate all memory that should be
+    // deallocated. But inside the clear() function it looks like it deallocates all
+    // properties and also calls clean() afterwards. All the memory allocated at this point
+    // should be in the form of elements and properties of base_mesh_ and meta_mesh_.
+    // __Most likely__ this bug was due to not removing the new properties and doubly
+    // creating them when TriangulationPipeline() is called again, but I have no time left
+    // for extensive testing. IF some memory error crops up again when rerolling triangulations
+    // it is most likely here but I don't know what exactly causes it.
     meta_mesh_->clear();
+    RemoveProperties();
     if (rtype == RATIO) {
       for (auto vh : base_mesh_->vertices()) {
         if (dis0(gen) == 1)
@@ -251,14 +263,28 @@ void Embedding::InitializeProperties() {
   base_mesh_->add_property(halfedge_weight_, "Pointer from base he to meta heh");
 }
 
+/*!
+ * \brief Embedding::RemoveProperties
+ */
+void Embedding::RemoveProperties() {
+  base_mesh_->remove_property(voronoiID_);
+  base_mesh_->remove_property(bsplithandle_);
+  base_mesh_->remove_property(bv_connection_);
+  meta_mesh_->remove_property(mv_connection_);
+  base_mesh_->remove_property(bhe_connection_);
+  meta_mesh_->remove_property(mhe_connection_);
+  base_mesh_->remove_property(bhe_border_);
+  meta_mesh_->remove_property(mhe_border_);
+  base_mesh_->remove_property(next_heh_);
+  base_mesh_->remove_property(halfedge_weight_);
+}
+
 /*!
  * \brief Embedding::CreateMetaMeshVertices
  * \param meta_mesh_points
  */
 void Embedding::CreateMetaMeshVertices(std::vector<OpenMesh::VertexHandle> meta_mesh_points) {
   qDebug() << "Start appointing BaseMesh properties:";
-  qDebug() << "is bv_connection_ valid? " << bv_connection_.is_valid();
-  qDebug() << "is bsplithandle_ valid? " << bsplithandle_.is_valid();
   for (auto bvh : base_mesh_->vertices()) {
     base_mesh_->property(bv_connection_, bvh) = OpenMesh::PolyConnectivity::InvalidVertexHandle;
     base_mesh_->property(bsplithandle_, bvh) = OpenMesh::PolyConnectivity::InvalidHalfedgeHandle;
diff --git a/Embedding.hh b/Embedding.hh
index 7b406d0e34415336907900c1438fdff445491d40..382bc081316d85762eca441800520adc84d47f80 100644
--- a/Embedding.hh
+++ b/Embedding.hh
@@ -89,6 +89,7 @@ private:
   bool TriangulationPipeline(
       std::vector<OpenMesh::VertexHandle> meta_mesh_points);
   void InitializeProperties();
+  void RemoveProperties();
   bool TriangulateMetaMesh();
   void PreProcessEdges();
   void ProcessHalfedge(OpenMesh::HalfedgeHandle mheh);
diff --git a/MetaMeshPlugin.cc b/MetaMeshPlugin.cc
index d1976488c9f2c849ae5b71d31079fd34d17bb187..8351a7c16ecdd39e3a3eb61b24b27c038eb7d3e3 100644
--- a/MetaMeshPlugin.cc
+++ b/MetaMeshPlugin.cc
@@ -429,13 +429,13 @@ void MetaMeshPlugin::copyselection() {
 void MetaMeshPlugin::DummySlotFunction1() {
   using namespace PluginFunctions;
   for (auto bheh : embedding_->GetBaseMesh()->halfedges()) {
-    if (embedding_->GetMetaMesh()->is_valid_handle(
-          embedding_->GetBaseMesh()->property(
-            embedding_->bhe_connection_, bheh))) {
-      embedding_->GetBaseMesh()->status(bheh).set_selected(true);
-    }
+    embedding_->GetBaseMesh()->status(bheh).set_selected(false);
+  }
+  for (auto mheh : meta_mesh_->halfedges()) {
+    meta_mesh_->status(mheh).set_selected(false);
   }
   emit updatedObject(base_mesh_id_, UPDATE_SELECTION);
+  emit updatedObject(meta_mesh_id_, UPDATE_SELECTION);
 }
 
 /*!