Restoring the masonry container logic