fixes a deadlock situation