fix sleep&wait,sleep works when thread more than 1