Performance fix for markers injection