Fix a crash when using the in-process mode.
Fix initial window selection in in-process mode.