fix bug for get thread