small fix for new pthread cleanup stuff