LocalTerminal and other fixes