Prevent deadlock during concurrent accesses