fixed recretion of images when first image gets deleted