Added safeguards to deal with building.