handled tty better