Updated to match latest commit in export_image branch