masonry script fix