small fix for thread