Even minor damage to one piece has an impact on the overall structure. Following fires, many older structures were repaired. The engineering will not allow for extra loading to be applied to areas of the structure, resulting in the building collapsing. As a result, most damaged structures are demolished and rebuilt. Modern buildings are designed to resist such effects, with sprinkler systems and fire-resistant materials used to prevent major damage. Fire can cause serious damage to buildings of all types, large or small. The type of construction of a building will determine how much damage it can stand before needing to be replaced. Fire can destroy wood buildings in a matter of minutes, while brick and stone buildings can survive longer. The degree of damage caused by fire depends on several factors including: the amount of heat released by the fire; the duration of time that the fire burns; the location of the building relative to the fire; and the presence of fuel for re-ignition if the fire breaks out again. Heat is the main danger from fire to buildings. It can melt metals, soften plastic, and even crack glass windows. Heat can be released rapidly into the building or slowly over time. A fire that releases its heat quickly can cause severe damage before water can be brought to put it out. A fire that releases its heat slowly may not cause as much damage until long after the fire has been extinguished.