fix for terminal emu