Fix parsing of image name.