bug fixes for multiplicity of images