added duplicated thread check