connecting new threads

In the beginning you need to check whether the topic is connected, and after it is rewritten path, check for it.