small dead lock fix