Fixed bug when the first building failing.