Fixing a bug related with the empty creation of images.