fix self-deadlock.