fix deadlocks & concurrency reads