Fix ugly bug at marker creation