prevent errors when not on tty