Minor change to order of events in marker creation loop