Bug fix for image import script