Fix #2416 in terminalapp plugin