if (!poles.ContainsKey(curentZoneId) || (poles.ContainsKey(curentZoneId) && match != null))

I fixed this part and it seems to work.

if ((poles.ContainsKey(curentZoneId)) && (match != null))