fix for thread lock