Another fix for running without a tty in pipe mode.