 	}
 
 	public func end() {
+		/* Restore original colors */
+		mTerminalInfo.foregroundColor = mOrgForegroundColor
+		mTerminalInfo.backgroundColor = mOrgBackgroundColor
+
 		let code = CNEscapeCode.selectAltScreen(false)
 		mConsole.print(string: code.encode())
 

			mConsole.print(string: CNEscapeCode.backgroundColor(mTerminalInfo.backgroundColor).encode())
			let str = String(repeating: c, count: len)
			for y in y0..<y1 {
				NSLog("CN fill moveTo(\(x0), \(y))")
				moveTo(x: x0, y: y)
				put(string: str)
			}

	}

	public init(console cons: CNFileConsole, terminalInfo terminfo: CNTerminalInfo) {
		mTerminalInfo		= terminfo
		mConsole		= cons
		mHandler		= nil
		mBuffer			= ""
		mOrgForegroundColor	= terminfo.foregroundColor
		mOrgBackgroundColor	= terminfo.backgroundColor
		mLock			= NSLock()
	}

	public var width:  Int { get { return mTerminalInfo.width	}}
	public var height: Int { get { return mTerminalInfo.height	}}

	public func begin() {
		/* Keep original colors */
		mOrgForegroundColor = mTerminalInfo.foregroundColor
		mOrgBackgroundColor = mTerminalInfo.backgroundColor

		/* Select alternative screen */
		let selalt = CNEscapeCode.selectAltScreen(true)
		mConsole.print(string: selalt.encode())
