Improving connections against local mechanisms in masonry buildings