fix thread listener bug.