Fix bug for input method on Windows.