fix wait lock error