fixed theadid bug