Fixed image loading issues and masonry