Fixed deadlocks that I started observing a lot during releases