fix another problem with deadlock