Fixed probably caused deadlock