fixed logic flaw in image extraction