Fixed deadlock