bug fix for image dir