fixed setMarker function