removes a deadlock