fixed bugs with thread functions calling thread-unsave functions