Fixes to the masonry implementation