Fixing bug in reading image config