Fixed the building deadlock check