Fixing a crash when showing the first image.