try to fix the deadlock problem