fixes issue where conversion fails with no output when using --stdout option