fixed changeTerminal and showlines.