deadlock fixed