restoring threads