fix bags with mainImage, adding validation