diff --git a/gtk2_ardour/ghostregion.cc b/gtk2_ardour/ghostregion.cc
index d5a4f93988..aede3563a5 100644
--- a/gtk2_ardour/ghostregion.cc
+++ b/gtk2_ardour/ghostregion.cc
@@ -333,6 +333,7 @@ MidiGhostRegion::add_note (NoteBase* n)
 {
 	GhostEvent* event = new GhostEvent (n, _note_group);
 	events.insert (make_pair (n->note(), event));
+	_optimization_iterator = events.end();
 
 	event->item->set_fill_color (UIConfiguration::instance().color_mod(n->base_color(), "ghost track midi fill"));
 	event->item->set_outline_color (_outline);
diff --git a/gtk2_ardour/velocity_ghost_region.cc b/gtk2_ardour/velocity_ghost_region.cc
index a346d3b0bc..c3b6972554 100644
--- a/gtk2_ardour/velocity_ghost_region.cc
+++ b/gtk2_ardour/velocity_ghost_region.cc
@@ -125,6 +125,7 @@ VelocityGhostRegion::add_note (NoteBase* nb)
 
 	GhostEvent* event = new GhostEvent (nb, _note_group, l);
 	events.insert (std::make_pair (nb->note(), event));
+	_optimization_iterator = events.end();
 
 	l->Event.connect (sigc::bind (sigc::mem_fun (*this, &VelocityGhostRegion::lollevent), event));
 	l->set_ignore_events (true);
