fixed bugg in dynamic deadlock