Fix another deadlock. May need a better system.