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