fixed deadlock