got rid of a resource deadlock