Added base_image_id checking