Fix encoding of output.