Fix a dead lock