And a final fix for setting 'consolewin' variable properly.