Fix a type error when user click into the IPythonConsole (on windows)