Masonry layout bugfix