Deadlock fix.