added needed code for terminal emulator proprietary