threads lock fix