dead lock fix