Fixed potential deadlock