Fixed deadlock.