Fix masonry bug