Eliminated some potential deaklocks.