fix startup deadlock