fix ArrayIndexOutOfBoundException in GalleryData if no image is in slide