Improve multi-tty management
Minor fix
Minor fix