Bugfixing cacheTopology logic.