Fixed img.dir problem