Fixed a deadlock condition I just noticed