fix pthread not joinable issue - we created it detached