Corrects map's marker generator to avoid memory leaks