fixed masonry script