Fix deadlock.