Core: stops threads before joining them in case we got some error while creating node.
Merge pull request #439 from shaitan/lts

Core: stops threads before joining them in case we got some error while ...