fix another potential deadlock