fix isatty for error stream