manual locks added, still causing deadlocks