fix when tty is required