avoid deadlock