Fix for the RuntimeException after making a photo