Fixes a potential bug when no image is available at all