added deadlock fix