Improve flexible topology finding