Fix: Yandex city.
Merge pull request #563 from dblock/fix-yandex-city

Fix: avoid exception in some some cases with Yandex city.