potential deadlock fix