Fixed issues with Masonry layout not working properly.