Minor fix to for outputting images.